aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-02-11 16:29:16 +0100
committerPéter Dimitrov <[email protected]>2019-02-11 16:29:16 +0100
commit578524273019737549e3ef9c7bde4ee6a6c42be3 (patch)
tree631fc424d234d94e4315c903a4461f4d40717606 /lib
parent934f9974eb6bec43cd9445ec0f5019a4d1389428 (diff)
downloadotp-578524273019737549e3ef9c7bde4ee6a6c42be3.tar.gz
otp-578524273019737549e3ef9c7bde4ee6a6c42be3.tar.bz2
otp-578524273019737549e3ef9c7bde4ee6a6c42be3.zip
ssl: Use sha256 in test certificates if supported
This commit fixes ssl_test_lib:appropriate_sha/1 that returns sha256 if it is supported by crypto. It returns sha1 otherwise. Change-Id: I0bfa4d50bbe3c788551a81d418db2cabc36a4344
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 7767d76a0d..294aeb0211 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -825,7 +825,8 @@ make_rsa_cert(Config) ->
Config
end.
appropriate_sha(CryptoSupport) ->
- case proplists:get_bool(sha256, CryptoSupport) of
+ Hashes = proplists:get_value(hashs, CryptoSupport),
+ case lists:member(sha256, Hashes) of
true ->
sha256;
false ->