From 53ae813221c2dee502e2c114e68c2674c96b89cd Mon Sep 17 00:00:00 2001 From: Qijiang Fan Date: Tue, 30 Dec 2014 22:44:20 +0800 Subject: ssl: docs: SNI server, connection_information/1,2 --- lib/ssl/doc/src/ssl.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'lib/ssl/doc/src/ssl.xml') diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml index c4651d051c..77f63dcecf 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -106,7 +106,8 @@

| {client_preferred_next_protocols, {client | server, [binary()]} | {client | server, [binary()], binary()}}

| {log_alert, boolean()}

-

| {server_name_indication, hostname() | disable}

+

| {server_name_indication, hostname() | disable}

+

| {sni_hosts, [{hostname(), ssloptions()}]}

transportoption() = @@ -626,7 +627,10 @@ fun(srp, Username :: string(), UserState :: term()) -> selection. If set to false (the default), use the client preference.

- + {sni_hosts, [{hostname(), ssloptions()}]} +

If the server receives a SNI (Server Name Indication) from the client + matching a host listed in the sni_hosts option, the speicific options for + that host will override previously specified options.

@@ -753,6 +757,45 @@ fun(srp, Username :: string(), UserState :: term()) -> + + connection_information(SslSocket) -> + {ok, Info} | {error, Reason} + Returns all the connection information. + + + Info = [InfoTuple] + InfoTuple = {protocol, Protocol} | {cipher_suite, CipherSuite} | {sni_hostname, SNIHostname} + CipherSuite = ciphersuite() + ProtocolVersion = protocol() + SNIHostname = string() + Reason = term() + +

Return all the connection information containing negotiated protocol version, cipher suite, and the hostname of SNI extension. + Info will be a proplists containing all the connection information on success, otherwise {error, Reason} will be returned.

+
+
+ + + connection_information(SslSocket, Items) -> + {ok, Info} | {error, Reason} + Returns the requested connection information. + + + Items = [Item] + Item = protocol | cipher_suite | sni_hostname + Info = [InfoTuple] + InfoTuple = {protocol, Protocol} | {cipher_suite, CipherSuite} | {sni_hostname, SNIHostname} + CipherSuite = ciphersuite() + ProtocolVersion = protocol() + SNIHostname = string() + Reason = term() + +

Returns the connection information you requested. The connection information you can request contains protocol, cipher_suite, and sni_hostname. + {ok, Info} will be returned if it executes sucessfully. The Info is a proplists containing the information you requested. + Otherwise, {error, Reason} will be returned.

+
+
+ format_error(Reason) -> string() Returns an error string. -- cgit v1.2.3