зеркало из https://github.com/mozilla/pjs.git
Resolves: 372440
Author: sparkins@redhat.com Summary: Re-implemented bug-fix to add a new constructor for the JSSESocketFactory class that allows an explicit socket factory to be passed in. This bug-fix was reimplemented in order to re-license the LDAP JDK under the standard Mozilla tri-license.
This commit is contained in:
Родитель
b8f400af83
Коммит
8f0d016aab
|
@ -47,10 +47,17 @@ public class JSSESocketFactory
|
|||
|
||||
static final long serialVersionUID = 6834205777733266609L;
|
||||
|
||||
protected SSLSocketFactory factory = null;
|
||||
|
||||
// Optional explicit cipher suites to use
|
||||
private String[] suites;
|
||||
// The socket factory
|
||||
private SSLSocketFactory factory;
|
||||
protected String[] suites = null;
|
||||
|
||||
/**
|
||||
* Default factory constructor
|
||||
*/
|
||||
public JSSESocketFactory() {
|
||||
this.factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory constructor that uses the default JSSE SSLSocketFactory
|
||||
|
@ -60,21 +67,29 @@ public class JSSESocketFactory
|
|||
* JSSE package
|
||||
*/
|
||||
public JSSESocketFactory( String[] suites ) {
|
||||
this(suites, null);
|
||||
this.suites = suites;
|
||||
this.factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory constructor
|
||||
* @param sf the SSL socketfactory to use
|
||||
*/
|
||||
public JSSESocketFactory( SSLSocketFactory factory) {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory constructor that provides an explicit SSLSocketFactory.
|
||||
* Factory constructor
|
||||
*
|
||||
* @param suites Cipher suites to attempt to use with the server;
|
||||
* if <code>null</code>, use any cipher suites available in the
|
||||
* JSSE package
|
||||
* @param factory the specific SSL server socket factory to use
|
||||
* @param sf the SSL socketfactory to use
|
||||
*/
|
||||
public JSSESocketFactory( String[] suites, SSLSocketFactory factory ) {
|
||||
this.suites = suites;
|
||||
this.factory = (factory != null) ? factory :
|
||||
(SSLSocketFactory)SSLSocketFactory.getDefault();
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче