Interface sun.security.ssl.SSLOptions
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sun.security.ssl.SSLOptions

public interface SSLOptions
extends Object
SSLOptions exposes the Secure Sockets Layer (SSL) specific functionality of an SSL socket. An SSL socket supports both this interface (used to access security functionality) and the Socket interface (used to access network features).

SSL is a secure channel communications protocol. You may think of it as being like TCP, with these security features added:

The SSLOptions API provides access to authentication data (where available), and provides some control over the kinds of protection being used on a given connection.

These kinds of protection are specified by a "cipher suite", which is a combination of cryptographic algorithms used by a given SSL connection. For example, how is integrity protection provided (what kind of message digest is used), how and whether the traffic is privacy-protected, and how authentication keys are exchanged.

When SSL connections are first set up, no security is provided. However, security is always provided by the time that application data is sent on the connection. Before sending such data, application programs may then express preferences for what cipher suites may be used in communication. SSL code performs a negotiation as part of preparing to send data. Some session suite that is supported by both sides of the SSL connection will be used; if there is no such suite, application data will not flow across the connection.


Notes:


Method Index

 o getActiveCipherSuite()
Returns the name of the SSL cipher suite which is currently active on this connection.
 o getEnabledCipherSuites()
Returns the names of the SSL cipher suites which are currently enabled for use on this connection.
 o getPeerCertificateChain()
Returns a certificate chain from the peer to a root CA.
 o getSupportedCipherSuites()
Returns the names of the SSL cipher suites which could be enabled for use on this connection.
 o setEnabledCipherSuites(String[])
Controls which particular SSL cipher suites are enabled for use on this connection.

Methods

 o getActiveCipherSuite
  public abstract String getActiveCipherSuite()
Returns the name of the SSL cipher suite which is currently active on this connection. This defines the level of protection which is provided to the data sent on the connection, including the kind of encryption used and most aspects of how authentication is performed.

The cipher suite names are as defined in the SSL protocol definition, and include:

Returns:
the name of the currently active cipher suite
See Also:
getEnabledCipherSuites, getSupportedCipherSuites, setEnabledCipherSuites
 o getEnabledCipherSuites
  public abstract String[] getEnabledCipherSuites()
Returns the names of the SSL cipher suites which are currently enabled for use on this connection. When an SSL socket is first created, all enabled cipher suites (a) protect data confidentiality, by traffic encryption, and (b) can mutually authenticate both clients and servers.
Returns:
an array of cipher suite names
See Also:
getActiveCipherSuite, getSupportedCipherSuites, setEnabledCipherSuites
 o getPeerCertificateChain
  public abstract CertChain getPeerCertificateChain() throws SSLPeerUnverified
Returns a certificate chain from the peer to a root CA.
Returns:
the chain of certificates
Throws: SSLPeerUnverified
the identity of the peer is not known.
 o getSupportedCipherSuites
  public abstract String[] getSupportedCipherSuites()
Returns the names of the SSL cipher suites which could be enabled for use on this connection. This list may include cipher suites which do not protect data confidentiality, or which do not support the mutual authentication of clients and servers.
Returns:
an array of cipher suite names; treat as readonly.
See Also:
getActiveCipherSuite, getEnabledCipherSuites, setEnabledCipherSuites
 o setEnabledCipherSuites
  public abstract void setEnabledCipherSuites(String suites[])
Controls which particular SSL cipher suites are enabled for use on this connection. The cipher suites must have been listed by getCipherSuites() as being supported.

NOTE: This routine should only be called before application data has been sent on the SSL connection. That is, getActiveCipherSuite must return SSL_NULL_WITH_NULL_NULL.

Parameters:
suites - Names of all the cipher suites to enable. These names should be sorted, since the first suite in the list is prioritized as the "best" one to use,
See Also:
getActiveCipherSuite, getEnabledCipherSuites, getSupportedCipherSuites

All Packages  Class Hierarchy  This Package  Previous  Next  Index