SSLParameters.ServerNames Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a List
containing all SNIServerName
s of the
Server Name Indication (SNI) parameter, or null if none has been set. -or- Sets the desired SNIServerName
s of the Server Name
Indication (SNI) parameter.
public System.Collections.Generic.IList<Javax.Net.Ssl.SNIServerName>? ServerNames { [Android.Runtime.Register("getServerNames", "()Ljava/util/List;", "", ApiSince=24)] get; [Android.Runtime.Register("setServerNames", "(Ljava/util/List;)V", "", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getServerNames", "()Ljava/util/List;", "", ApiSince=24)>]
[<set: Android.Runtime.Register("setServerNames", "(Ljava/util/List;)V", "", ApiSince=24)>]
member this.ServerNames : System.Collections.Generic.IList<Javax.Net.Ssl.SNIServerName> with get, set
Property Value
null or an immutable list of non-null SNIServerName
s
- Attributes
Remarks
Property getter documentation:
Returns a List
containing all SNIServerName
s of the Server Name Indication (SNI) parameter, or null if none has been set.
This method is only useful to SSLSocket
s or SSLEngine
s operating in client mode.
For SSL/TLS connections, the underlying SSL/TLS provider may specify a default value for a certain server name type. In client mode, it is recommended that, by default, providers should include the server name indication whenever the server can be located by a supported server name type.
It is recommended that providers initialize default Server Name Indications when creating SSLSocket
/SSLEngine
s. In the following examples, the server name could be represented by an instance of SNIHostName
which has been initialized with the hostname "www.example.com" and type StandardConstants#SNI_HOST_NAME
.
Socket socket =
sslSocketFactory.createSocket("www.example.com", 443);
or
SSLEngine engine =
sslContext.createSSLEngine("www.example.com", 443);
Added in 1.8.
Java documentation for javax.net.ssl.SSLParameters.getServerNames()
.
Property setter documentation:
Sets the desired SNIServerName
s of the Server Name Indication (SNI) parameter.
This method is only useful to SSLSocket
s or SSLEngine
s operating in client mode.
Note that the serverNames
list is cloned to protect against subsequent modification.
Added in 1.8.
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.