SSLServerSocket.SetEnabledProtocols(String[]) Method

Definition

Controls which particular protocols are enabled for use by accepted connections.

[Android.Runtime.Register("setEnabledProtocols", "([Ljava/lang/String;)V", "GetSetEnabledProtocols_arrayLjava_lang_String_Handler")]
public abstract void SetEnabledProtocols (string[]? protocols);
[<Android.Runtime.Register("setEnabledProtocols", "([Ljava/lang/String;)V", "GetSetEnabledProtocols_arrayLjava_lang_String_Handler")>]
abstract member SetEnabledProtocols : string[] -> unit

Parameters

protocols
String[]

Names of all the protocols to enable.

Attributes

Exceptions

if one of the protocols is not supported.

Remarks

Controls which particular protocols are enabled for use by accepted connections.

The protocols must have been listed by getSupportedProtocols() as being supported. Following a successful call to this method, only protocols listed in the protocols parameter are enabled for use.

Because of the way the protocol version is negotiated, connections will only be able to use a member of the lowest set of contiguous enabled protocol versions. For example, enabling TLSv1.2 and TLSv1 will result in connections only being able to use TLSv1.

SSLSockets returned from accept() inherit this setting.

Java documentation for javax.net.ssl.SSLServerSocket.setEnabledProtocols(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