diff options
author | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:42:24 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:42:24 +0100 |
commit | b1b8a8d5f60de105371d17fefcb4812887250ff9 (patch) | |
tree | 47888be06e5eb3c5ebe70bf2dc9b394c337bcfc5 /lib/ssl/src/dtls_v1.erl | |
parent | d2e05787454aebc8406a2f781b2648c552019763 (diff) | |
parent | 98ecac283f87e02e7916a402043a3bd518fc25be (diff) | |
download | otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.tar.gz otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.tar.bz2 otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/src/dtls_v1.erl')
-rw-r--r-- | lib/ssl/src/dtls_v1.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/ssl/src/dtls_v1.erl b/lib/ssl/src/dtls_v1.erl index ffd3e4b833..dd0d35d404 100644 --- a/lib/ssl/src/dtls_v1.erl +++ b/lib/ssl/src/dtls_v1.erl @@ -21,12 +21,21 @@ -include("ssl_cipher.hrl"). --export([suites/1, mac_hash/7, ecc_curves/1, corresponding_tls_version/1, corresponding_dtls_version/1]). +-export([suites/1, all_suites/1, mac_hash/7, ecc_curves/1, + corresponding_tls_version/1, corresponding_dtls_version/1]). -spec suites(Minor:: 253|255) -> [ssl_cipher:cipher_suite()]. suites(Minor) -> - tls_v1:suites(corresponding_minor_tls_version(Minor)). + lists:filter(fun(Cipher) -> + is_acceptable_cipher(ssl_cipher:suite_definition(Cipher)) + end, + tls_v1:suites(corresponding_minor_tls_version(Minor))). +all_suites(Version) -> + lists:filter(fun(Cipher) -> + is_acceptable_cipher(ssl_cipher:suite_definition(Cipher)) + end, + ssl_cipher:all_suites(corresponding_tls_version(Version))). mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) -> tls_v1:mac_hash(MacAlg, MacSecret, SeqNo, Type, Version, @@ -50,3 +59,5 @@ corresponding_minor_dtls_version(2) -> 255; corresponding_minor_dtls_version(3) -> 253. +is_acceptable_cipher(Suite) -> + not ssl_cipher:is_stream_ciphersuite(Suite). |