File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/test/java/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 2828import org .eclipse .jetty .server .handler .ContextHandler ;
2929import org .eclipse .jetty .util .ssl .SslContextFactory ;
3030import org .junit .After ;
31+ import org .junit .Before ;
3132import org .junit .Test ;
3233
3334import javax .net .ssl .SSLContext ;
@@ -56,8 +57,24 @@ public class OAuth2ClientCredentialsGrantCredentialsProviderTest {
5657
5758 Server server ;
5859
60+ static boolean isJava13 () {
61+ String javaVersion = System .getProperty ("java.version" );
62+ return javaVersion != null && javaVersion .startsWith ("13." );
63+ }
64+
65+ @ Before
66+ public void init () {
67+ if (isJava13 ()) {
68+ // for Java 13.0.7, see https://github.com/bcgit/bc-java/issues/941
69+ System .setProperty ("keystore.pkcs12.keyProtectionAlgorithm" , "PBEWithHmacSHA256AndAES_256" );
70+ }
71+ }
72+
5973 @ After
6074 public void tearDown () throws Exception {
75+ if (isJava13 ()) {
76+ System .setProperty ("keystore.pkcs12.keyProtectionAlgorithm" , "" );
77+ }
6178 if (server != null ) {
6279 server .stop ();
6380 }
You can’t perform that action at this time.
0 commit comments