aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_v1.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-03-08 10:39:22 +0100
committerIngela Anderton Andin <[email protected]>2017-03-08 10:39:22 +0100
commit70d003ddaecfc290cee565920b89579417c34f9a (patch)
treea0bb6492a867bf61a8d43a3baec570aa29c08a06 /lib/ssl/src/dtls_v1.erl
parent0fe6927bf752226270b191282375a031768d8be3 (diff)
parent000f557f87eb80d3f7c7b57adacd016986117f81 (diff)
downloadotp-70d003ddaecfc290cee565920b89579417c34f9a.tar.gz
otp-70d003ddaecfc290cee565920b89579417c34f9a.tar.bz2
otp-70d003ddaecfc290cee565920b89579417c34f9a.zip
Merge branch 'ingela/ssl/dtls-cont' into maint
* ingela/ssl/dtls-cont: dtls: Only test this for TLS for now dtls: Avoid mixup of protocol to test dtls: 'dtlsv1.2' corresponds to 'tlsv1.2' dtls: Correct dialyzer spec and postpone inclusion of test dtls: Erlang distribution over DTLS is not supported dtls: Enable some DTLS tests in ssl_to_openssl_SUITE dtls: Enable DTLS test in ssl_certificate_verify_SUITE dtls: Hibernation and retransmit timers dtls: Make sure retransmission timers are run dtls: DTLS specific handling of socket and ciphers
Diffstat (limited to 'lib/ssl/src/dtls_v1.erl')
-rw-r--r--lib/ssl/src/dtls_v1.erl15
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).