Methods Summary |
---|
protected java.lang.Object | clone()Returns the clone of this object.
// BEGIN android-changed
try {
return super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// END android-changed
|
protected ClientSessionContext | getClientSessionContext()
// END android-changed
return clientSessionContext;
|
protected static org.apache.harmony.xnet.provider.jsse.SSLParameters | getDefault()
if (defaultParameters == null) {
// BEGIN android-changed
defaultParameters = new SSLParameters(null, null, null, null, null);
// END android-changed
}
return (SSLParameters) defaultParameters.clone();
|
protected boolean | getEnableSessionCreation()Returns the value indicating if the peer with this parameters
allowed to cteate new SSL session
return enable_session_creation;
|
protected java.lang.String[] | getEnabledCipherSuites()
if (enabledCipherSuiteNames == null) {
// BEGIN android-added
CipherSuite[] enabledCipherSuites = getEnabledCipherSuitesMember();
// END android-added
enabledCipherSuiteNames = new String[enabledCipherSuites.length];
for (int i = 0; i< enabledCipherSuites.length; i++) {
enabledCipherSuiteNames[i] = enabledCipherSuites[i].getName();
}
}
return (String[]) enabledCipherSuiteNames.clone();
|
protected CipherSuite[] | getEnabledCipherSuitesMember()
// BEGIN android-changed
if (enabledCipherSuites == null) this.enabledCipherSuites = CipherSuite.defaultCipherSuites;
return enabledCipherSuites;
|
protected java.lang.String[] | getEnabledProtocols()
return (String[]) enabledProtocols.clone();
|
protected javax.net.ssl.X509KeyManager | getKeyManager()
return keyManager;
|
protected boolean | getNeedClientAuth()Returns the value indicating if the peer with this parameters tuned
to require client authentication
return need_client_auth;
|
protected synchronized int | getSSLCTX()Returns the native SSL context, creating it on-the-fly, if necessary.
if (ssl_ctx == 0) ssl_ctx = nativeinitsslctx();
return ssl_ctx;
|
protected java.security.SecureRandom | getSecureRandom()
// BEGIN android-removed
// return secureRandom;
// END android-removed
// BEGIN android-added
if (secureRandom != null) return secureRandom;
if (defaultSecureRandom == null)
{
defaultSecureRandom = new SecureRandom();
}
secureRandom = defaultSecureRandom;
// END android-added
return secureRandom;
|
protected java.security.SecureRandom | getSecureRandomMember()
return secureRandom;
|
protected ServerSessionContext | getServerSessionContext()
// END android-changed
return serverSessionContext;
|
protected javax.net.ssl.X509TrustManager | getTrustManager()
return trustManager;
|
protected boolean | getUseClientMode()Returns the value indicating if the parameters configured to work
in client mode.
return client_mode;
|
protected boolean | getWantClientAuth()Returns the value indicating if the peer with this parameters
tuned to request client authentication
return want_client_auth;
|
private native int | nativeinitsslctx()Initializes our native SSL context.
|
protected void | setEnableSessionCreation(boolean flag)Allows/disallows the peer holding this parameters to
create new SSL session
enable_session_creation = flag;
|
protected void | setEnabledCipherSuites(java.lang.String[] suites)Sets the set of available cipher suites for use in SSL connection.
if (suites == null) {
throw new IllegalArgumentException("Provided parameter is null");
}
CipherSuite[] cipherSuites = new CipherSuite[suites.length];
for (int i=0; i<suites.length; i++) {
cipherSuites[i] = CipherSuite.getByName(suites[i]);
if (cipherSuites[i] == null || !cipherSuites[i].supported) {
throw new IllegalArgumentException(suites[i] +
" is not supported.");
}
}
enabledCipherSuites = cipherSuites;
enabledCipherSuiteNames = suites;
|
protected void | setEnabledProtocols(java.lang.String[] protocols)Sets the set of available protocols for use in SSL connection.
if (protocols == null) {
throw new IllegalArgumentException("Provided parameter is null");
}
for (int i=0; i<protocols.length; i++) {
if (!ProtocolVersion.isSupported(protocols[i])) {
throw new IllegalArgumentException("Protocol " + protocols[i] +
" is not supported.");
}
}
enabledProtocols = protocols;
|
protected void | setNeedClientAuth(boolean need)Tunes the peer holding this parameters to require client authentication
need_client_auth = need;
// reset the want_client_auth setting
want_client_auth = false;
|
protected void | setUseClientMode(boolean mode)Tunes the peer holding this parameters to work in client mode.
client_mode = mode;
|
protected void | setWantClientAuth(boolean want)Tunes the peer holding this parameters to request client authentication
want_client_auth = want;
// reset the need_client_auth setting
need_client_auth = false;
|