Home » openjdk-7 » javax » net » ssl » [javadoc | source]
javax.net.ssl
public class: SSLParameters [javadoc | source]
java.lang.Object
   javax.net.ssl.SSLParameters
Encapsulates parameters for an SSL/TLS connection. The parameters are the list of ciphersuites to be accepted in an SSL/TLS handshake, the list of protocols to be allowed, the endpoint identification algorithm during SSL/TLS handshaking, the algorithm constraints and whether SSL/TLS servers should request or require client authentication.

SSLParameters can be created via the constructors in this class. Objects can also be obtained using the getSSLParameters() methods in SSLSocket and SSLServerSocket and SSLEngine or the getDefaultSSLParameters() and getSupportedSSLParameters() methods in SSLContext.

SSLParameters can be applied to a connection via the methods SSLSocket.setSSLParameters() and SSLServerSocket.setSSLParameters() and SSLEngine.getSSLParameters() .

Constructor:
 public SSLParameters() 
 public SSLParameters(String[] cipherSuites) 
    Constructs SSLParameters from the specified array of ciphersuites.

    Calling this constructor is equivalent to calling the no-args constructor followed by setCipherSuites(cipherSuites);.

    Parameters:
    cipherSuites - the array of ciphersuites (or null)
 public SSLParameters(String[] cipherSuites,
    String[] protocols) 
    Constructs SSLParameters from the specified array of ciphersuites and protocols.

    Calling this constructor is equivalent to calling the no-args constructor followed by setCipherSuites(cipherSuites); setProtocols(protocols);.

    Parameters:
    cipherSuites - the array of ciphersuites (or null)
    protocols - the array of protocols (or null)
Method from javax.net.ssl.SSLParameters Summary:
getAlgorithmConstraints,   getCipherSuites,   getEndpointIdentificationAlgorithm,   getNeedClientAuth,   getProtocols,   getWantClientAuth,   setAlgorithmConstraints,   setCipherSuites,   setEndpointIdentificationAlgorithm,   setNeedClientAuth,   setProtocols,   setWantClientAuth
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.net.ssl.SSLParameters Detail:
 public AlgorithmConstraints getAlgorithmConstraints() 
    Returns the cryptographic algorithm constraints.
 public String[] getCipherSuites() 
    Returns a copy of the array of ciphersuites or null if none have been set.
 public String getEndpointIdentificationAlgorithm() 
    Gets the endpoint identification algorithm.
 public boolean getNeedClientAuth() 
    Returns whether client authentication should be required.
 public String[] getProtocols() 
    Returns a copy of the array of protocols or null if none have been set.
 public boolean getWantClientAuth() 
    Returns whether client authentication should be requested.
 public  void setAlgorithmConstraints(AlgorithmConstraints constraints) 
    Sets the cryptographic algorithm constraints, which will be used in addition to any configured by the runtime environment.

    If the constraints parameter is non-null, every cryptographic algorithm, key and algorithm parameters used in the SSL/TLS handshake must be permitted by the constraints.

 public  void setCipherSuites(String[] cipherSuites) 
    Sets the array of ciphersuites.
 public  void setEndpointIdentificationAlgorithm(String algorithm) 
    Sets the endpoint identification algorithm.

    If the algorithm parameter is non-null or non-empty, the endpoint identification/verification procedures must be handled during SSL/TLS handshaking. This is to prevent man-in-the-middle attacks.

 public  void setNeedClientAuth(boolean needClientAuth) 
    Sets whether client authentication should be required. Calling this method clears the wantClientAuth flag.
 public  void setProtocols(String[] protocols) 
    Sets the array of protocols.
 public  void setWantClientAuth(boolean wantClientAuth) 
    Sets whether client authentication should be requested. Calling this method clears the needClientAuth flag.