aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-07-18 16:49:53 +0200
committerPéter Dimitrov <[email protected]>2019-07-25 14:49:16 +0200
commit1dbba57853b7b093bf7e770f29eefa958d04b131 (patch)
treed4ddd426070e68e2bd50575d4688f7b3fcbc63da
parent83f9c5c032cc502df38b52d8a5b0389657b37801 (diff)
downloadotp-1dbba57853b7b093bf7e770f29eefa958d04b131.tar.gz
otp-1dbba57853b7b093bf7e770f29eefa958d04b131.tar.bz2
otp-1dbba57853b7b093bf7e770f29eefa958d04b131.zip
ssl: Update property tests with psk_key_exchange_modes
-rw-r--r--lib/ssl/test/property_test/ssl_eqc_handshake.erl25
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/ssl/test/property_test/ssl_eqc_handshake.erl b/lib/ssl/test/property_test/ssl_eqc_handshake.erl
index 21aad26425..f495161e78 100644
--- a/lib/ssl/test/property_test/ssl_eqc_handshake.erl
+++ b/lib/ssl/test/property_test/ssl_eqc_handshake.erl
@@ -119,11 +119,11 @@ tls_msg(Version) ->
%%
client_hello(?'TLS_v1.3' = Version) ->
#client_hello{session_id = session_id(),
- client_version = ?'TLS_v1.2',
- cipher_suites = cipher_suites(Version),
- compression_methods = compressions(Version),
- random = client_random(Version),
- extensions = client_hello_extensions(Version)
+ client_version = ?'TLS_v1.2',
+ cipher_suites = cipher_suites(Version),
+ compression_methods = compressions(Version),
+ random = client_random(Version),
+ extensions = client_hello_extensions(Version)
};
client_hello(Version) ->
#client_hello{session_id = session_id(),
@@ -323,7 +323,7 @@ extensions(?'TLS_v1.3' = Version, client_hello) ->
%% Padding,
KeyShare,
%% PreSharedKey,
- %% PSKKeyExchangeModes,
+ PSKKeyExchangeModes,
%% EarlyData,
%% Cookie,
SupportedVersions,
@@ -346,7 +346,7 @@ extensions(?'TLS_v1.3' = Version, client_hello) ->
%% oneof([padding(), undefined]),
oneof([key_share(client_hello), undefined]),
%% oneof([pre_shared_key(), undefined]),
- %% oneof([psk_key_exchange_modes(), undefined]),
+ oneof([psk_key_exchange_modes(), undefined]),
%% oneof([early_data(), undefined]),
%% oneof([cookie(), undefined]),
oneof([client_hello_versions(Version)]),
@@ -374,7 +374,7 @@ extensions(?'TLS_v1.3' = Version, client_hello) ->
%% padding => Padding,
key_share => KeyShare,
%% pre_shared_key => PreSharedKey,
- %% psk_key_exhange_modes => PSKKeyExchangeModes,
+ psk_key_exchange_modes => PSKKeyExchangeModes,
%% early_data => EarlyData,
%% cookie => Cookie,
client_hello_versions => SupportedVersions,
@@ -826,3 +826,12 @@ group_list(N, Pool, Acc) ->
R = rand:uniform(length(Pool)),
G = lists:nth(R, Pool),
group_list(N - 1, Pool -- [G], [G|Acc]).
+
+
+ke_modes() ->
+ oneof([[psk_ke],[psk_dhe_ke],[psk_ke,psk_dhe_ke]]).
+
+psk_key_exchange_modes() ->
+ ?LET(KEModes, ke_modes(),
+ #psk_key_exchange_modes{
+ ke_modes = KEModes}).