diff options
author | Péter Dimitrov <[email protected]> | 2019-04-24 13:14:12 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-04-30 17:18:36 +0200 |
commit | 8b78203da881bb56e71d44b17b7d335546ad89bf (patch) | |
tree | 052c32761d432ecce6df17f374c3042dc530fa6b /lib/ssl | |
parent | e7a51b4877d98be1b76da7cb98892ca46e2a6e7b (diff) | |
download | otp-8b78203da881bb56e71d44b17b7d335546ad89bf.tar.gz otp-8b78203da881bb56e71d44b17b7d335546ad89bf.tar.bz2 otp-8b78203da881bb56e71d44b17b7d335546ad89bf.zip |
ssl: Update type spec of ssl:suite_to_str/1
Change-Id: I7987e80cca7af184a9f40cdcd8ea8f07c318ba0d
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/doc/src/ssl.xml | 2 | ||||
-rw-r--r-- | lib/ssl/src/ssl.erl | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml index fcbffb53a3..9c170d08af 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -1530,7 +1530,7 @@ fun(srp, Username :: string(), UserState :: term()) -> </func> <func> - <name since="OTP 21.0" name="suite_to_str" arity="1" /> + <name since="OTP 21.0" name="suite_to_str" arity="1" clause_i="1" /> <fsummary>Returns the string representation of a cipher suite.</fsummary> <desc> <p>Returns the string representation of a cipher suite.</p> diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index 6f52226d5d..bd619d7a0a 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -112,7 +112,6 @@ aes_128_gcm | aes_256_gcm | chacha20_poly1305 | - null | legacy_cipher(). % exported -type legacy_cipher() :: rc4_128 | des_cbc | @@ -120,8 +119,7 @@ -type hash() :: sha | sha2() | - legacy_hash() | - null. % exported + legacy_hash(). % exported -type sha2() :: sha224 | sha256 | @@ -136,8 +134,8 @@ ecdhe_ecdsa | ecdh_ecdsa | ecdh_rsa | srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | - dh_anon | ecdh_anon | srp_anon | - any | null. %% TLS 1.3 , exported + dh_anon | ecdh_anon | srp_anon. + -type erl_cipher_suite() :: #{key_exchange := kex_algo(), cipher := cipher(), mac := hash() | aead, @@ -1264,7 +1262,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. %%-------------------------------------------------------------------- |