From 3008d77a2c93b45c45da1739d63abf2f476ad490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Wed, 24 Apr 2019 13:14:12 +0200 Subject: ssl: Update type spec of ssl:suite_to_str/1 Change-Id: I7987e80cca7af184a9f40cdcd8ea8f07c318ba0d --- lib/ssl/doc/src/ssl.xml | 2 +- lib/ssl/src/ssl.erl | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/ssl') diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml index 8e4c21ba02..27046a8434 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -1600,7 +1600,7 @@ fun(srp, Username :: string(), UserState :: term()) -> - + Returns the string representation of a cipher suite.

Returns the string representation of a cipher suite.

diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index f4941fe0bf..65578ebe53 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -118,7 +118,6 @@ aes_128_ccm_8 | aes_256_ccm_8 | chacha20_poly1305 | - null | legacy_cipher(). % exported -type legacy_cipher() :: rc4_128 | des_cbc | @@ -126,8 +125,7 @@ -type hash() :: sha | sha2() | - legacy_hash() | - null. % exported + legacy_hash(). % exported -type sha2() :: sha224 | sha256 | @@ -158,7 +156,7 @@ srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | dh_anon | ecdh_anon | srp_anon | - any | null. %% TLS 1.3 , exported + any. %% TLS 1.3 , exported -type erl_cipher_suite() :: #{key_exchange := kex_algo(), cipher := cipher(), mac := hash() | aead, @@ -1379,7 +1377,13 @@ tls_version({254, _} = Version) -> %%-------------------------------------------------------------------- -spec suite_to_str(CipherSuite) -> string() when - CipherSuite :: erl_cipher_suite(). + CipherSuite :: erl_cipher_suite(); + (CipherSuite) -> string() when + %% For internal use! + CipherSuite :: #{key_exchange := null, + cipher := null, + mac := null, + prf := null}. %% %% Description: Return the string representation of a cipher suite. %%-------------------------------------------------------------------- -- cgit v1.2.3