diff options
author | Ingela Anderton Andin <[email protected]> | 2018-02-01 14:28:22 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-02-07 11:55:44 +0100 |
commit | b16d7d7e4cfa15ab00e5ce43f50619d02bc2f986 (patch) | |
tree | 5d589dedcce1b6f1336dcae8d6d1e64057015b23 /lib/ssl/src/dtls_v1.erl | |
parent | cece38b7dccf8563b44eb095ba202f55e07e807f (diff) | |
download | otp-b16d7d7e4cfa15ab00e5ce43f50619d02bc2f986.tar.gz otp-b16d7d7e4cfa15ab00e5ce43f50619d02bc2f986.tar.bz2 otp-b16d7d7e4cfa15ab00e5ce43f50619d02bc2f986.zip |
ssl: Make sure anonymous suites are handled separately
Preferably customized cipher suites will be based on the default value.
But all may be used as base and hence it will be good to
handle anonymous suites separately as they are intended for testing purposes.
Diffstat (limited to 'lib/ssl/src/dtls_v1.erl')
-rw-r--r-- | lib/ssl/src/dtls_v1.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_v1.erl b/lib/ssl/src/dtls_v1.erl index 51ee8ec047..0f6344b6f7 100644 --- a/lib/ssl/src/dtls_v1.erl +++ b/lib/ssl/src/dtls_v1.erl @@ -21,7 +21,7 @@ -include("ssl_cipher.hrl"). --export([suites/1, all_suites/1, hmac_hash/3, ecc_curves/1, +-export([suites/1, all_suites/1, anonymous_suites/1,hmac_hash/3, ecc_curves/1, corresponding_tls_version/1, corresponding_dtls_version/1, cookie_secret/0, cookie_timeout/0]). @@ -40,6 +40,12 @@ all_suites(Version) -> end, ssl_cipher:all_suites(corresponding_tls_version(Version))). +anonymous_suites(Version) -> + lists:filter(fun(Cipher) -> + is_acceptable_cipher(ssl_cipher:suite_definition(Cipher)) + end, + ssl_cipher:anonymous_suites(corresponding_tls_version(Version))). + hmac_hash(MacAlg, MacSecret, Value) -> tls_v1:hmac_hash(MacAlg, MacSecret, Value). |