Android APIs
public class

SSLParameters

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SSLParameters ()

Added in API level 9

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

public SSLParameters (String[] cipherSuites)

Added in API level 9

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.

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

Added in API level 9

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

public String[] getCipherSuites ()

Added in API level 9

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

Returns
String[]

public boolean getNeedClientAuth ()

Added in API level 9

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

Returns
boolean

public String[] getProtocols ()

Added in API level 9

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

Returns
String[]

public boolean getWantClientAuth ()

Added in API level 9

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

Returns
boolean

public void setCipherSuites (String[] cipherSuites)

Added in API level 9

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

Parameters
cipherSuites String

public void setNeedClientAuth (boolean needClientAuth)

Added in API level 9

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

Parameters
needClientAuth boolean

public void setProtocols (String[] protocols)

Added in API level 9

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

Parameters
protocols String

public void setWantClientAuth (boolean wantClientAuth)

Added in API level 9

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

Parameters
wantClientAuth boolean