Fixes #870 - TLS protocol exclusion broken for SslContextFactory(String).
Introduced a private constructor that performs the correct initialization, and have the other constructors delegate to it.
This commit is contained in:
parent
9e01565344
commit
01e29aa45a
|
@ -241,9 +241,7 @@ public class SslContextFactory extends AbstractLifeCycle
|
|||
*/
|
||||
public SslContextFactory(boolean trustAll)
|
||||
{
|
||||
setTrustAll(trustAll);
|
||||
addExcludeProtocols("SSL", "SSLv2", "SSLv2Hello", "SSLv3");
|
||||
setExcludeCipherSuites("^.*_(MD5|SHA|SHA1)$");
|
||||
this(trustAll, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,7 +250,16 @@ public class SslContextFactory extends AbstractLifeCycle
|
|||
*/
|
||||
public SslContextFactory(String keyStorePath)
|
||||
{
|
||||
setKeyStorePath(keyStorePath);
|
||||
this(false, keyStorePath);
|
||||
}
|
||||
|
||||
private SslContextFactory(boolean trustAll, String keyStorePath)
|
||||
{
|
||||
setTrustAll(trustAll);
|
||||
addExcludeProtocols("SSL", "SSLv2", "SSLv2Hello", "SSLv3");
|
||||
setExcludeCipherSuites("^.*_(MD5|SHA|SHA1)$");
|
||||
if (keyStorePath != null)
|
||||
setKeyStorePath(keyStorePath);
|
||||
}
|
||||
|
||||
public String[] getSelectedProtocols()
|
||||
|
|
Loading…
Reference in New Issue