aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/property_test
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-11-19 11:14:42 +0100
committerPéter Dimitrov <[email protected]>2018-11-20 09:55:54 +0100
commitfeb095f9e46e67a2e119c673220c519542a190c0 (patch)
tree96cb6d695f4bcf092a8ce8b6c17f186bbc996d8e /lib/ssl/test/property_test
parentf2ec822db072c3366effc93688e6def9742d8c5b (diff)
downloadotp-feb095f9e46e67a2e119c673220c519542a190c0.tar.gz
otp-feb095f9e46e67a2e119c673220c519542a190c0.tar.bz2
otp-feb095f9e46e67a2e119c673220c519542a190c0.zip
ssl: Fix property tests
Replace hardcoded max size in 'choose' function with the length of supported groups. Change-Id: I4ac595cfee2c3cf0c9d9e1cffd0988940130a0d6
Diffstat (limited to 'lib/ssl/test/property_test')
-rw-r--r--lib/ssl/test/property_test/ssl_eqc_handshake.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssl/test/property_test/ssl_eqc_handshake.erl b/lib/ssl/test/property_test/ssl_eqc_handshake.erl
index 0165c68a18..6ffb6d311f 100644
--- a/lib/ssl/test/property_test/ssl_eqc_handshake.erl
+++ b/lib/ssl/test/property_test/ssl_eqc_handshake.erl
@@ -716,7 +716,8 @@ key_share(server_hello) ->
server_share = ServerShare}).
key_share_entry_list() ->
- ?LET(Size, choose(1,8), key_share_entry_list(Size)).
+ Max = length(ssl:groups()),
+ ?LET(Size, choose(1,Max), key_share_entry_list(Size)).
%%
key_share_entry_list(N) ->
key_share_entry_list(N, ssl:groups(), []).
@@ -746,7 +747,8 @@ generate_public_key(Group) ->
PublicKey.
groups() ->
- ?LET(Size, choose(1,8), group_list(Size)).
+ Max = length(ssl:groups()),
+ ?LET(Size, choose(1,Max), group_list(Size)).
group_list(N) ->
group_list(N, ssl:groups(), []).