Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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 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 An array of cipher names that is cloned for use within the SSLParameters, or null.
protocols 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.

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.

public String[] getProtocols ()

Added in API level 9

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

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.

public void setCipherSuites ( String[] cipherSuites)

Added in API level 9

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

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.

public void setProtocols ( String[] protocols)

Added in API level 9

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

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.