diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLContext.java b/src/java/com/wolfssl/provider/jsse/WolfSSLContext.java index d826236..34c1ce0 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLContext.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLContext.java @@ -101,7 +101,10 @@ public class WolfSSLContext extends SSLContextSpi { } catch (Exception e) { throw new IllegalArgumentException(e); - } + } + + /* auto-populate enabled ciphersuites with supported ones */ + params.setCipherSuites(WolfSSL.getCiphersIana()); } private void LoadTrustedRootCerts() { diff --git a/src/test/com/wolfssl/provider/jsse/test/WolfSSLServerSocketTest.java b/src/test/com/wolfssl/provider/jsse/test/WolfSSLServerSocketTest.java index 549797f..67f3d8d 100644 --- a/src/test/com/wolfssl/provider/jsse/test/WolfSSLServerSocketTest.java +++ b/src/test/com/wolfssl/provider/jsse/test/WolfSSLServerSocketTest.java @@ -167,7 +167,7 @@ public class WolfSSLServerSocketTest { s.close(); /* should be null since we haven't set them */ - if (cipherSuites != null) { + if (cipherSuites == null) { System.out.println("\t... failed"); fail("SSLServerSocket.getEnabledCipherSuites() failed"); } diff --git a/src/test/com/wolfssl/provider/jsse/test/WolfSSLSocketTest.java b/src/test/com/wolfssl/provider/jsse/test/WolfSSLSocketTest.java index 23be73f..54f853a 100644 --- a/src/test/com/wolfssl/provider/jsse/test/WolfSSLSocketTest.java +++ b/src/test/com/wolfssl/provider/jsse/test/WolfSSLSocketTest.java @@ -196,7 +196,7 @@ public class WolfSSLSocketTest { SSLSocket s = socks.get(i); String[] cipherSuites = s.getEnabledCipherSuites(); - if (cipherSuites != null) { + if (cipherSuites == null) { System.out.println("\t... failed"); fail("SSLSocket.getEnabledCipherSuites() failed"); }