File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/test/java/com/rabbitmq/stream/impl Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 4949import javax .net .ssl .SSLException ;
5050import javax .net .ssl .SSLHandshakeException ;
5151import javax .net .ssl .SSLParameters ;
52+ import org .junit .jupiter .api .AfterEach ;
53+ import org .junit .jupiter .api .BeforeEach ;
5254import org .junit .jupiter .api .Test ;
5355import org .junit .jupiter .api .extension .ExtendWith ;
5456
5557@ DisabledIfTlsNotEnabled
5658@ ExtendWith (TestUtils .StreamTestInfrastructureExtension .class )
5759public class TlsTest {
5860
61+ static boolean isJava13 () {
62+ String javaVersion = System .getProperty ("java.version" );
63+ return javaVersion != null && javaVersion .startsWith ("13." );
64+ }
65+
66+ @ BeforeEach
67+ public void init () {
68+ if (isJava13 ()) {
69+ // for Java 13.0.7, see https://github.com/bcgit/bc-java/issues/941
70+ System .setProperty ("keystore.pkcs12.keyProtectionAlgorithm" , "PBEWithHmacSHA256AndAES_256" );
71+ }
72+ }
73+
74+ @ AfterEach
75+ public void tearDown () throws Exception {
76+ if (isJava13 ()) {
77+ System .setProperty ("keystore.pkcs12.keyProtectionAlgorithm" , "" );
78+ }
79+ }
80+
5981 String stream ;
6082
6183 TestUtils .ClientFactory cf ;
You can’t perform that action at this time.
0 commit comments