aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-04-24 13:14:12 +0200
committerPéter Dimitrov <[email protected]>2019-04-24 15:07:18 +0200
commit3008d77a2c93b45c45da1739d63abf2f476ad490 (patch)
tree391d7f4bb4ca24eccca325cd5705727e1b658815 /lib
parent04faa82c43ba43929087b6d91fb1f9cbff34cb99 (diff)
downloadotp-3008d77a2c93b45c45da1739d63abf2f476ad490.tar.gz
otp-3008d77a2c93b45c45da1739d63abf2f476ad490.tar.bz2
otp-3008d77a2c93b45c45da1739d63abf2f476ad490.zip
ssl: Update type spec of ssl:suite_to_str/1
Change-Id: I7987e80cca7af184a9f40cdcd8ea8f07c318ba0d
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/doc/src/ssl.xml2
-rw-r--r--lib/ssl/src/ssl.erl14
2 files changed, 10 insertions, 6 deletions
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()) ->
</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 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.
%%--------------------------------------------------------------------