2018年12月21日(金) 12:11 Christopher Schultz <ch...@christopherschultz.net>:
> -----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. > Hi. The case of using TcpFailureDetector, there is a case to write directly without passing through the interceptor chain. TcpFailureDetector#memberAlive writes the channel data directly to outputstream without passing through the interceptor chain. However, when receiving this channel data, It passes through the interceptor chain. So, it must be received by TcpFailureDetector before decrypt of EncryptInterceptor. That is, the order is important. The order is EncryptInterceptor -> TcpFailureDetector. > > 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 > > -- Keiichi.Fujino