to top
Android APIs
Added in API level 1
package

javax.net.ssl

This package provides classes and interfaces needed to use the Secure Sockets Layer (SSL) protocol and the successor Transport Layer Security (TLS) protocol. The API allows for both client and server sockets, the selection of desired SSL and TLS protocol versions, and the selection of desired cipher suites. The X509TrustManager interface allows customization of certificate chain verification. The X509KeyManager interface and X509ExtendedKeyManager class allows the specification of a server's required certificate or a client's optional client certificate. Android uses code from The Legion of the Bouncy Castle and OpenSSL.

Interfaces

HandshakeCompletedListener The listener to be implemented to receive event notifications on completion of SSL handshake on an SSL connection. 
HostnameVerifier The interface to be used to provide hostname verification functionality. 
KeyManager This is the interface to implement in order to mark a class as a JSSE key managers so that key managers can be easily grouped. 
ManagerFactoryParameters The marker interface for key manager factory parameters. 
SSLSession The interface representing an SSL session. 
SSLSessionBindingListener The interface to be implemented by any object that requires notification when data objects are bound to (or unbound from) an SSLSession
SSLSessionContext A collection of SSLSessions. 
TrustManager The marker interface for JSSE trust managers. 
X509KeyManager A Key Manager for X509 certificate-based key pairs. 
X509TrustManager The trust manager for X509 certificates to be used to perform authentication for secure sockets. 

Classes

CertPathTrustManagerParameters Certification path parameters to provide to certification path based TrustManager
HandshakeCompletedEvent The event object encapsulating the information about a completed SSL handshake on a SSL connection. 
HttpsURLConnection An HttpURLConnection for HTTPS (RFC 2818). 
KeyManagerFactory The public API for KeyManagerFactory implementations. 
KeyManagerFactorySpi The Service Provider Interface (SPI) for the KeyManagerFactory class. 
KeyStoreBuilderParameters The parameters for KeyManagers. 
SSLContext The public API for secure socket protocol implementations. 
SSLContextSpi The Service Provider Interface (SPI) for the SSLContext class. 
SSLEngine The abstract implementation of secure communications using SSL, TLS, or other protocols. 
SSLEngineResult The result object describing the state of the SSLEngine produced by the wrap() and unwrap() operations. 
SSLParameters SSL handshake parameters that include protocols, cipher suites, and client authentication requirements. 
SSLPermission Legacy security code; do not use. 
SSLServerSocket The extension of ServerSocket which provides secure server sockets based on protocols like SSL, TLS, or others. 
SSLServerSocketFactory The factory for SSL server sockets. 
SSLSessionBindingEvent The event sent to an SSLSessionBindingListener when the listener object is bound (putValue(String, Object)) or unbound (removeValue(String)) to an SSLSession
SSLSocket The extension of Socket providing secure protocols like SSL (Secure Sockets Layer) or TLS (Transport Layer Security). 
SSLSocketFactory The abstract factory implementation to create SSLSockets. 
TrustManagerFactory The factory for TrustManagers based on KeyStore or provider specific implementation. 
TrustManagerFactorySpi The Service Provider Interface (SPI) for the TrustManagerFactory class. 
X509ExtendedKeyManager The abstract extension for the X509KeyManager interface. 

Enums

SSLEngineResult.HandshakeStatus The enum describing the state of the current handshake. 
SSLEngineResult.Status The enum describing the result of the SSLEngine operation. 

Exceptions

SSLException The base class for all SSL related exceptions. 
SSLHandshakeException The exception that is thrown when a handshake could not be completed successfully. 
SSLKeyException The exception that is thrown when an invalid SSL key is encountered. 
SSLPeerUnverifiedException The exception that is thrown when the identity of a peer has not beed verified. 
SSLProtocolException The exception that is thrown when an error in the operation of the SSL protocol is encountered.