getAllProtocols, getSupportedProtocols to get built in protocols

pull/42/head
kojo1 2020-05-13 05:58:35 +09:00
parent 140f2eb78d
commit 7fc87f550f
2 changed files with 3 additions and 10 deletions

View File

@ -175,10 +175,7 @@ public class WolfSSLEngineHelper {
/* gets all supported protocols */
protected String[] getAllProtocols() {
if(ssl != null)
return WolfSSL.getProtocolsMask(ssl.getOptions());
else
return WolfSSL.getProtocols();
return WolfSSL.getProtocols();
}
protected void setUseClientMode(boolean mode)

View File

@ -138,7 +138,7 @@ public class WolfSSLServerSocket extends SSLServerSocket {
@Override
public String[] getSupportedProtocols() {
return WolfSSL.getProtocols();
return params.getProtocols();
}
@Override
@ -160,11 +160,7 @@ public class WolfSSLServerSocket extends SSLServerSocket {
/* sanitize protocol array for unsupported strings */
List<String> supported;
if(context != null)
supported = Arrays.asList(
WolfSSL.getProtocolsMask(context.getOptions()));
else
supported = Arrays.asList(WolfSSL.getProtocols());
supported = Arrays.asList(WolfSSL.getProtocols());
for (int i = 0; i < protocols.length; i++) {
if (!supported.contains(protocols[i])) {