Skip to content

Most visited

Recently visited

navigation
Added in API level 9

SSLParameters

public class SSLParameters
extends Object

java.lang.Object
   ↳ javax.net.ssl.SSLParameters


SSL handshake parameters that include protocols, cipher suites, and client authentication requirements.

Summary

Public constructors

SSLParameters()

The default SSLParameters constructor.

SSLParameters(String[] cipherSuites)

A SSLParameters constructor that allows the values for the initial cipher suites array to be provided.

SSLParameters(String[] cipherSuites, String[] protocols)

A SSLParameters constructor that allows the values for initial cipher suites and protocols arrays to be provided.

Public methods

String[] getCipherSuites()

Returns a copy of the cipher suites, or null if none have been specified.

boolean getNeedClientAuth()

Returns true if a server requires authentication from a client during handshaking.

String[] getProtocols()

Returns a copy of the protocols, or null if none have been specified.

boolean getWantClientAuth()

Returns true if a server optionally wants to authenticate a client during handshaking.

void setCipherSuites(String[] cipherSuites)

Sets the cipher suites to a copy of the input, or null

void setNeedClientAuth(boolean needClientAuth)

Sets whether or not to a server needs client authentication.

void setProtocols(String[] protocols)

Sets the protocols to a copy of the input, or null

void setWantClientAuth(boolean wantClientAuth)

Sets whether or not to a server wants client authentication.

Inherited methods

From class java.lang.Object

Public constructors

SSLParameters

Added in API level 9
SSLParameters ()

The default SSLParameters constructor. Cipher suites and protocols are initialized to null and client authentication options are initialized to false.

SSLParameters

Added in API level 9
SSLParameters (String[] cipherSuites)

A SSLParameters constructor that allows the values for the initial cipher suites array to be provided. Other values default as specified in SSLParameters().

Parameters
cipherSuites String: An array of cipherSuites that is cloned for use within the SSLParameters, or null.

SSLParameters

Added in API level 9
SSLParameters (String[] cipherSuites, 
                String[] protocols)

A SSLParameters constructor that allows the values for initial cipher suites and protocols arrays to be provided. Other values default as specified in SSLParameters().

Parameters
cipherSuites String: An array of cipher names that is cloned for use within the SSLParameters, or null.
protocols String: An array of protocol names that is cloned for use within the SSLParameters, or null.

Public methods

getCipherSuites

Added in API level 9
String[] getCipherSuites ()

Returns a copy of the cipher suites, or null if none have been specified.

Returns
String[]

getNeedClientAuth

Added in API level 9
boolean getNeedClientAuth ()

Returns true if a server requires authentication from a client during handshaking. If this returns true, getWantClientAuth() will return false.

Returns
boolean

getProtocols

Added in API level 9
String[] getProtocols ()

Returns a copy of the protocols, or null if none have been specified.

Returns
String[]

getWantClientAuth

Added in API level 9
boolean getWantClientAuth ()

Returns true if a server optionally wants to authenticate a client during handshaking. If this returns true, getNeedClientAuth() will return false.

Returns
boolean

setCipherSuites

Added in API level 9
void setCipherSuites (String[] cipherSuites)

Sets the cipher suites to a copy of the input, or null

Parameters
cipherSuites String

setNeedClientAuth

Added in API level 9
void setNeedClientAuth (boolean needClientAuth)

Sets whether or not to a server needs client authentication. After calling this, #getWantClientAuth() will return false.

Parameters
needClientAuth boolean

setProtocols

Added in API level 9
void setProtocols (String[] protocols)

Sets the protocols to a copy of the input, or null

Parameters
protocols String

setWantClientAuth

Added in API level 9
void setWantClientAuth (boolean wantClientAuth)

Sets whether or not to a server wants client authentication. After calling this, #getNeedClientAuth() will return false.

Parameters
wantClientAuth boolean
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.