SSLContext.Default Property

Definition

Returns the default SSL context. -or- Sets the default SSL context.

public static Javax.Net.Ssl.SSLContext? Default { [Android.Runtime.Register("getDefault", "()Ljavax/net/ssl/SSLContext;", "")] get; [Android.Runtime.Register("setDefault", "(Ljavax/net/ssl/SSLContext;)V", "")] set; }
[<get: Android.Runtime.Register("getDefault", "()Ljavax/net/ssl/SSLContext;", "")>]
[<set: Android.Runtime.Register("setDefault", "(Ljavax/net/ssl/SSLContext;)V", "")>]
static member Default : Javax.Net.Ssl.SSLContext with get, set

Property Value

the default SSL context

Attributes

Exceptions

if there is a problem creating the default instance.

on a null argument

Remarks

Property getter documentation:

Returns the default SSL context.

If a default context was set using the #setDefault SSLContext.setDefault() method, it is returned. Otherwise, the first call of this method triggers the call SSLContext.getInstance("Default"). If successful, that object is made the default SSL context and returned.

The default context is immediately usable and does not require #init initialization.

Added in 1.6.

Java documentation for javax.net.ssl.SSLContext.getDefault().

Property setter documentation:

Sets the default SSL context. It will be returned by subsequent calls to #getDefault. The default context must be immediately usable and not require #init initialization.

Developers are <em>strongly</em> discouraged from changing the default SSLContext as it is used as the Android default for secure communication by APIs like SSLSocketFactory#getDefault(), SSLServerSocketFactory#getDefault() and HttpsURLConnection.

Added in 1.6.

Java documentation for javax.net.ssl.SSLContext.setDefault(javax.net.ssl.SSLContext).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to