From ba4fb703a5c20ed26186d5ae968020819c1d8780 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Fri, 4 Jan 2019 11:01:21 +0100 Subject: ssl: Add value 'save' to reuse_sessions and reuse_session client option We want to be able to save a specific session to reuse, and make sure it is reusable immediatly when the connection has been established. Add client option {reuse_session, SessionID::binary()} We also do not want clients to save sessions that it did not verify. Additionaly change behaviour of the client and server to not save sessions if reuse_session is set to false. --- lib/ssl/doc/src/ssl.xml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 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 b4aa8746f9..586452efd4 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -83,8 +83,9 @@

| {ciphers, ciphers()}

| {user_lookup_fun, {fun(), term()}}, {psk_identity, string()}, {srp_identity, {string(), string()}}

-

| {reuse_sessions, boolean()}

-

| {reuse_session, fun()} {next_protocols_advertised, [binary()]}

+

| {reuse_sessions, boolean() | save()}

+

| {reuse_session, fun() | binary()}

+

| {next_protocols_advertised, [binary()]}

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

| {log_alert, boolean()}

@@ -575,11 +576,23 @@ fun(srp, Username :: string(), UserState :: term()) ->

In mode verify_none the default behavior is to allow all x509-path validation errors. See also option verify_fun.

+ + {reuse_session, binary()} +

Reuses a specific session earlier saved with the option + {reuse_sessions, save} since ssl-9.2 +

- {reuse_sessions, boolean()} -

Specifies if the client is to try to reuse sessions - when possible.

- + {reuse_sessions, boolean() | save} +

When save is specified a new connection will be negotiated + and saved for later reuse. The session ID can be fetched with + connection_information/2 + and used with the client option reuse_session + The boolean value true specifies that if possible, automatized session reuse will + be performed. If a new session is created, and is unique in regard + to previous stored sessions, it will be saved for possible later reuse. + Value save since ssl-9.2 +

+ {cacerts, [public_key:der_encoded()]}

The DER-encoded trusted certificates. If this option is supplied it overrides option cacertfile.

@@ -758,11 +771,14 @@ fun(srp, Username :: string(), UserState :: term()) -> {reuse_sessions, boolean()} -

Specifies if the server is to agree to reuse sessions - when requested by the clients. See also option reuse_session. +

The boolean value true specifies that the server will + agree to reuse sessions. Setting it to false will result in an empty + session table, that is no sessions will be reused. + See also option reuse_session

- {reuse_session, fun(SuggestedSessionId, + + {reuse_session, fun(SuggestedSessionId, PeerCert, Compression, CipherSuite) -> boolean()}

Enables the TLS/DTLS server to have a local policy for deciding if a session is to be reused or not. -- cgit v1.2.3