to top
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 ()

Since: 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)

Since: 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)

Since: 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 ()

Since: API Level 9

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

public boolean getNeedClientAuth ()

Since: 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 ()

Since: API Level 9

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

public boolean getWantClientAuth ()

Since: 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)

Since: API Level 9

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

public void setNeedClientAuth (boolean needClientAuth)

Since: 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)

Since: API Level 9

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

public void setWantClientAuth (boolean wantClientAuth)

Since: API Level 9

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