SSLContext.GetInstance Method

Definition

Overloads

GetInstance(String, Provider)

Returns a SSLContext object that implements the specified secure socket protocol.

GetInstance(String, String)

Returns a SSLContext object that implements the specified secure socket protocol.

GetInstance(String)

Returns a SSLContext object that implements the specified secure socket protocol.

GetInstance(String, Provider)

Returns a SSLContext object that implements the specified secure socket protocol.

[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;", "")]
public static Javax.Net.Ssl.SSLContext? GetInstance (string? protocol, Java.Security.Provider? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/net/ssl/SSLContext;", "")>]
static member GetInstance : string * Java.Security.Provider -> Javax.Net.Ssl.SSLContext

Parameters

protocol
String

the standard name of the requested protocol. See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names.

provider
Provider

an instance of the provider.

Returns

the new SSLContext object.

Attributes

Exceptions

if the specified provider cannot provide the requested protocol.

if protocol is null (instead of NoSuchAlgorithmException as in 1.4 release)

Remarks

Returns a SSLContext object that implements the specified secure socket protocol.

A new SSLContext object encapsulating the SSLContextSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.

Java documentation for javax.net.ssl.SSLContext.getInstance(java.lang.String, java.security.Provider).

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

GetInstance(String, String)

Returns a SSLContext object that implements the specified secure socket protocol.

[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljavax/net/ssl/SSLContext;", "")]
public static Javax.Net.Ssl.SSLContext? GetInstance (string? protocol, string? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljavax/net/ssl/SSLContext;", "")>]
static member GetInstance : string * string -> Javax.Net.Ssl.SSLContext

Parameters

protocol
String

the standard name of the requested protocol. See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names.

provider
String

the name of the provider.

Returns

the new SSLContext object.

Attributes

Exceptions

if the specified provider cannot provider the requested protocol.

if the specified provider does not exits.

if protocol is null (instead of NoSuchAlgorithmException as in 1.4 release)

Remarks

Returns a SSLContext object that implements the specified secure socket protocol.

A new SSLContext object encapsulating the SSLContextSpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list.

Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders() method.

Java documentation for javax.net.ssl.SSLContext.getInstance(java.lang.String, java.lang.String).

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

GetInstance(String)

Returns a SSLContext object that implements the specified secure socket protocol.

[Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;", "")]
public static Javax.Net.Ssl.SSLContext? GetInstance (string? protocol);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljavax/net/ssl/SSLContext;", "")>]
static member GetInstance : string -> Javax.Net.Ssl.SSLContext

Parameters

protocol
String

the standard name of the requested protocol. See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names.

Returns

the new SSLContext object.

Attributes

Exceptions

if no installed provider can provide the requested protocol

if protocol is null (instead of NoSuchAlgorithmException as in 1.4 release)

Remarks

Returns a SSLContext object that implements the specified secure socket protocol.

This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SSLContext object encapsulating the SSLContextSpi implementation from the first Provider that supports the specified protocol is returned.

Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders() method.

Java documentation for javax.net.ssl.SSLContext.getInstance(java.lang.String).

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