File tree 1 file changed +22
-0
lines changed
src/test/java/com/rabbitmq/stream/impl
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 49
49
import javax .net .ssl .SSLException ;
50
50
import javax .net .ssl .SSLHandshakeException ;
51
51
import javax .net .ssl .SSLParameters ;
52
+ import org .junit .jupiter .api .AfterEach ;
53
+ import org .junit .jupiter .api .BeforeEach ;
52
54
import org .junit .jupiter .api .Test ;
53
55
import org .junit .jupiter .api .extension .ExtendWith ;
54
56
55
57
@ DisabledIfTlsNotEnabled
56
58
@ ExtendWith (TestUtils .StreamTestInfrastructureExtension .class )
57
59
public class TlsTest {
58
60
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
+
59
81
String stream ;
60
82
61
83
TestUtils .ClientFactory cf ;
You can’t perform that action at this time.
0 commit comments