Javax.Net.Ssl.SSLSocket Class
The extension of Socket providing secure protocols like SSL (Secure Sockets Layer) or TLS (Transport Layer Security).

See Also: SSLSocket Members

Syntax

[Android.Runtime.Register("javax/net/ssl/SSLSocket", DoNotGenerateAcw=true)]
public abstract class SSLSocket : Java.Net.Socket

Remarks

The extension of Socket providing secure protocols like SSL (Secure Sockets Layer) or TLS (Transport Layer Security).

Default configuration

SSLSocket instances obtained from default Javax.Net.Ssl.SSLSocketFactory, Javax.Net.Ssl.SSLServerSocketFactory, and Javax.Net.Ssl.SSLContext are configured as follows:

Protocols

Client socket:
ProtocolSupported (API Levels)Enabled by default (API Levels)
SSLv31+1+
TLSv11+1+
TLSv1.116+20+
TLSv1.216+20+

Server socket:
ProtocolSupported (API Levels)Enabled by default (API Levels)
SSLv31+1+
TLSv11+1+
TLSv1.116+16+
TLSv1.216+16+

Cipher suites

Methods that operate with cipher suite names (for example, SSLSocket.GetSupportedCipherSuites, SSLSocket.SetEnabledCipherSuites(String[])) have used standard names for cipher suites since API Level 9, as listed in the table below. Prior to API Level 9, non-standard (OpenSSL) names had been used (see the table following this table).
Cipher suiteSupported (API Levels)Enabled by default (API Levels)
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA9+9-19
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA9+9-19
SSL_DHE_DSS_WITH_DES_CBC_SHA9+9-19
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA9+9-19
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA9+9-19
SSL_DHE_RSA_WITH_DES_CBC_SHA9+9-19
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA9+
SSL_DH_anon_EXPORT_WITH_RC4_40_MD59+
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA9+
SSL_DH_anon_WITH_DES_CBC_SHA9+
SSL_DH_anon_WITH_RC4_128_MD59+
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA9+9-19
SSL_RSA_EXPORT_WITH_RC4_40_MD59+9-19
SSL_RSA_WITH_3DES_EDE_CBC_SHA9+9-19
SSL_RSA_WITH_DES_CBC_SHA9+9-19
SSL_RSA_WITH_NULL_MD59+
SSL_RSA_WITH_NULL_SHA9+
SSL_RSA_WITH_RC4_128_MD59+9-19
SSL_RSA_WITH_RC4_128_SHA9+9+
TLS_DHE_DSS_WITH_AES_128_CBC_SHA9+9+
TLS_DHE_DSS_WITH_AES_128_CBC_SHA25620+
TLS_DHE_DSS_WITH_AES_128_GCM_SHA25620+
TLS_DHE_DSS_WITH_AES_256_CBC_SHA9+11+
TLS_DHE_DSS_WITH_AES_256_CBC_SHA25620+
TLS_DHE_DSS_WITH_AES_256_GCM_SHA38420+
TLS_DHE_RSA_WITH_AES_128_CBC_SHA9+9+
TLS_DHE_RSA_WITH_AES_128_CBC_SHA25620+
TLS_DHE_RSA_WITH_AES_128_GCM_SHA25620+20+
TLS_DHE_RSA_WITH_AES_256_CBC_SHA9+11+
TLS_DHE_RSA_WITH_AES_256_CBC_SHA25620+
TLS_DHE_RSA_WITH_AES_256_GCM_SHA38420+20+
TLS_DH_anon_WITH_AES_128_CBC_SHA9+
TLS_DH_anon_WITH_AES_128_CBC_SHA25620+
TLS_DH_anon_WITH_AES_128_GCM_SHA25620+
TLS_DH_anon_WITH_AES_256_CBC_SHA9+
TLS_DH_anon_WITH_AES_256_CBC_SHA25620+
TLS_DH_anon_WITH_AES_256_GCM_SHA38420+
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA11+11-19
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA11+11+
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA25620+
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA25620+20+
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA11+11+
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA38420+
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38420+20+
TLS_ECDHE_ECDSA_WITH_NULL_SHA11+
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA11+11+
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA21+21+
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA21+21+
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA11+11-19
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA11+11+
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA25620+
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA25620+20+
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA11+11+
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA38420+
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA38420+20+
TLS_ECDHE_RSA_WITH_NULL_SHA11+
TLS_ECDHE_RSA_WITH_RC4_128_SHA11+11+
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA11+11-19
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA11+11-19
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA25620+
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA25620+
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA11+11-19
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA38420+
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA38420+
TLS_ECDH_ECDSA_WITH_NULL_SHA11+
TLS_ECDH_ECDSA_WITH_RC4_128_SHA11+11-19
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA11+11-19
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA11+11-19
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA25620+
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA25620+
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA11+11-19
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA38420+
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA38420+
TLS_ECDH_RSA_WITH_NULL_SHA11+
TLS_ECDH_RSA_WITH_RC4_128_SHA11+11-19
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA11+
TLS_ECDH_anon_WITH_AES_128_CBC_SHA11+
TLS_ECDH_anon_WITH_AES_256_CBC_SHA11+
TLS_ECDH_anon_WITH_NULL_SHA11+
TLS_ECDH_anon_WITH_RC4_128_SHA11+
TLS_EMPTY_RENEGOTIATION_INFO_SCSV11+11+
TLS_FALLBACK_SCSV21+
TLS_PSK_WITH_3DES_EDE_CBC_SHA21+
TLS_PSK_WITH_AES_128_CBC_SHA21+21+
TLS_PSK_WITH_AES_256_CBC_SHA21+21+
TLS_PSK_WITH_RC4_128_SHA21+
TLS_RSA_WITH_AES_128_CBC_SHA9+9+
TLS_RSA_WITH_AES_128_CBC_SHA25620+
TLS_RSA_WITH_AES_128_GCM_SHA25620+20+
TLS_RSA_WITH_AES_256_CBC_SHA9+11+
TLS_RSA_WITH_AES_256_CBC_SHA25620+
TLS_RSA_WITH_AES_256_GCM_SHA38420+20+
TLS_RSA_WITH_NULL_SHA25620+

NOTE: PSK cipher suites are enabled by default only if the SSLContext through which the socket was created has been initialized with a PSKKeyManager.

API Levels 1 to 8 use OpenSSL names for cipher suites. The table below lists these OpenSSL names and their corresponding standard names used in API Levels 9 and newer.
OpenSSL cipher suiteStandard cipher suiteSupported (API Levels)Enabled by default (API Levels)
AES128-SHATLS_RSA_WITH_AES_128_CBC_SHA1+1+
AES256-SHATLS_RSA_WITH_AES_256_CBC_SHA1+1-8, 11+
DES-CBC-MD5SSL_CK_DES_64_CBC_WITH_MD51-81-8
DES-CBC-SHASSL_RSA_WITH_DES_CBC_SHA1+1-19
DES-CBC3-MD5SSL_CK_DES_192_EDE3_CBC_WITH_MD51-81-8
DES-CBC3-SHASSL_RSA_WITH_3DES_EDE_CBC_SHA1+1-19
DHE-DSS-AES128-SHATLS_DHE_DSS_WITH_AES_128_CBC_SHA1+1+
DHE-DSS-AES256-SHATLS_DHE_DSS_WITH_AES_256_CBC_SHA1+1-8, 11+
DHE-RSA-AES128-SHATLS_DHE_RSA_WITH_AES_128_CBC_SHA1+1+
DHE-RSA-AES256-SHATLS_DHE_RSA_WITH_AES_256_CBC_SHA1+1-8, 11+
EDH-DSS-DES-CBC-SHASSL_DHE_DSS_WITH_DES_CBC_SHA1+1-19
EDH-DSS-DES-CBC3-SHASSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA1+1-19
EDH-RSA-DES-CBC-SHASSL_DHE_RSA_WITH_DES_CBC_SHA1+1-19
EDH-RSA-DES-CBC3-SHASSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA1+1-19
EXP-DES-CBC-SHASSL_RSA_EXPORT_WITH_DES40_CBC_SHA1+1-19
EXP-EDH-DSS-DES-CBC-SHASSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA1+1-19
EXP-EDH-RSA-DES-CBC-SHASSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA1+1-19
EXP-RC2-CBC-MD5SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD51-81-8
EXP-RC4-MD5SSL_RSA_EXPORT_WITH_RC4_40_MD51+1-19
RC2-CBC-MD5SSL_CK_RC2_128_CBC_WITH_MD51-81-8
RC4-MD5SSL_RSA_WITH_RC4_128_MD51+1-19
RC4-SHASSL_RSA_WITH_RC4_128_SHA1+1+

[Android Documentation]

Requirements

Namespace: Javax.Net.Ssl
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1