On Thu, Dec 20, 2018, 10:11 PM Christopher Schultz <
ch...@christopherschultz.net wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Tim,
>
> On 12/20/18 10:18, Tim K wrote:
> >>
> >> I just downloaded and tried 9.0.14 but I'm still getting the same
> >> BadPaddingException upon starting the second instance.  I
> >> confirmed the encryptionKey matches on my two instances.
> >>
> >
> > Maybe something is wrong with my config?  For this test, I have
> > both Tomcats on the same server using different ports:
>
> This is the only thing that matters to the encryption interceptor:
>
> > <Interceptor
> > className="org.apache.catalina.tribes.group.interceptors.EncryptInterc
> eptor"
> >
> >
> encryptionKey="e0f2cdf931e99fdce0453964294f97f3" />
>
> I'm not sure if the order of encrypt/asyncdispatch interceptors
> matters much.
>
> I copy/pasted your key into the TestEncryptInterceptor unit test and I
> didn't get any errors. I generated 4 new 32-character (16-byte) keys
> and tried all of them and didn't get any errors.
>
> Oddly, the very first time I copy/pasted it from your email message
> into the tester it failed with BadPaddingException, but when I
> re-copied "just in case" it stopped failing. Can you download and
> build the 9.0.14 source and run that unit test in your environment?
> Like this:
>
>   $ ant test
> - -Dtest.entry=org.apache.catalina.tribes.group.interceptors.TestEncryptIn
> terceptor
>
> If that works, try copy/pasting your key into the source file of the
> test -- it's right up at the top, called "encryptionKey128" -- then
> save and re-run the test (ant will recompile it). If that works...
> then I'm stumped.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwcWdEACgkQHPApP6U8
> pFhClRAAnW4mZ59yG6exLzJqv6nNW8wdUhrLY2eGWFroWN3JMADU7kwA14ndNZfv
> iOEIaaE1zvtEiScivqAj6VhIetrb/j07NUSX8eoUYzsEWS6GlFtAY53ok/6xPX4F
> 5MUxJTjklQr16C/IAx+4mgbTE/eUKWodfE58Q5sZo6acKxmikwMFFdRkGfqlkLe3
> Gmed6zCHMjbhr/yq3g7J484wEqmzYXhGcOHHfNERxunjrcnfd4m4pqQhjTiLMNRN
> wRG6wovEbAwv3P/PPlGu30d776m3OKNAaYIh17AHFEB2dS6Xn5GToMHAyp5nmRFs
> Tt+bWhWnB37EmsvvvU+yH17CqUtatdnCw1UHVseoVZGmzefpxQdwuh57Hs1NLSSN
> 683giOomSALGWupBd6XV56XfV19k+PuB1gv2He4AfJRmBzJhyS4WTJgwalMcIEOF
> 4r2hmJQGhoopTZR3grvycLTzKvSH/s35Lbf2C1BSxZ+lxsig46NYeemX8xe9H39g
> s/30ACCNV3h2LUjrqHTQ+wT4VBtOvC7VviZnWzaegmjDuP7xPEENr2uYt230eRGt
> Z+WkHrhTkLchwmdK4v1ziCNPgggfI8vEM6IOQwxxmwiwthYpfxA7zDBFgqiJUMO4
> HN/74VauFxG2YeK4LFPYd3i65fCYZRqLceMuzfquYgdmX6ccgQQ=
> =IAd9
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


I grabbed the src from the site and built it successfully, tried the test
but it is looking for a message.bin file... I tried just touch'ing that
file and the first test fails with a NegativeArraySizeException and it
deletes the message.bin file and the subsequent 2 tests can't find it.  Is
there something special I need to do with that message.bin file to run the
junit tests?

test-nio:

    [junit] Running
org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor

    [junit] Tests run: 17, Failures: 0, Errors: 0, Skipped: 2, Time
elapsed: 0.364 sec

    [junit] File message.bin does not exist. Skipping test.



test-nio2:

    [junit] Running
org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor

    [junit] Tests run: 17, Failures: 0, Errors: 0, Skipped: 2, Time
elapsed: 0.625 sec

    [junit] File message.bin does not exist. Skipping test.



test-apr-exists:



test-apr:

    [junit] Running
org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor

    [junit] Tests run: 17, Failures: 0, Errors: 0, Skipped: 2, Time
elapsed: 0.465 sec

    [junit] File message.bin does not exist. Skipping test.



cobertura-report:



test:

   [concat] Testsuites with skipped tests:

   [concat]
TEST-org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor.APR.txt

   [concat]
TEST-org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor.NIO.txt

   [concat]
TEST-org.apache.catalina.tribes.group.interceptors.TestEncryptInterceptor.NIO2.txt

   [concat] Testsuites with failed tests:



BUILD SUCCESSFUL

Total time: 11 seconds

Also, I tried just using the exact encryptionKey128 you had within the test
class and that one didn't work in my config either, same
BadPaddingException.

-Tim

Reply via email to