aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-09-12 11:05:38 +0200
committerPéter Dimitrov <[email protected]>2018-09-12 11:05:38 +0200
commitfc49d1ea0b9b14772fef3567f05f96db6996ec63 (patch)
tree7d6ae939d0efad95209b806e3f2c1bdac4171dd7 /lib/ssl
parent9949b14f52437e3b833a59d2d1be7f034459377e (diff)
parent6a1254c9f89916487497ee6175fc481107c2aa85 (diff)
downloadotp-fc49d1ea0b9b14772fef3567f05f96db6996ec63.tar.gz
otp-fc49d1ea0b9b14772fef3567f05f96db6996ec63.tar.bz2
otp-fc49d1ea0b9b14772fef3567f05f96db6996ec63.zip
Merge branch 'peterdmv/ssl/property_test_client_hello'
* peterdmv/ssl/property_test_client_hello: ssl: Property test hello extensions Change-Id: I78f5cdef8702141b78e9123efe34e381a5e5d12c
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/property_test/ssl_eqc_handshake.erl50
1 files changed, 48 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 5303785b17..88046f7386 100644
--- a/lib/ssl/test/property_test/ssl_eqc_handshake.erl
+++ b/lib/ssl/test/property_test/ssl_eqc_handshake.erl
@@ -136,8 +136,54 @@ compressions(_) ->
client_random(_) ->
crypto:strong_rand_bytes(32).
-client_extensions(_) ->
- #hello_extensions{}.
+client_extensions(?'TLS_v1.3' = Version) ->
+ #hello_extensions{
+ client_hello_versions =
+ #client_hello_versions{
+ versions = supported_versions(Version)
+ },
+ signature_algs_cert =
+ #signature_scheme_list{
+ signature_scheme_list = signature_scheme_list()
+ }
+ };
+client_extensions(Version) ->
+ #hello_extensions{
+ client_hello_versions =
+ #client_hello_versions{
+ versions = supported_versions(Version)
+ }
+ }.
+
+signature_scheme_list() ->
+ oneof([[rsa_pkcs1_sha256],
+ [rsa_pkcs1_sha256, ecdsa_sha1],
+ [rsa_pkcs1_sha256,
+ rsa_pkcs1_sha384,
+ rsa_pkcs1_sha512,
+ ecdsa_secp256r1_sha256,
+ ecdsa_secp384r1_sha384,
+ ecdsa_secp521r1_sha512,
+ rsa_pss_rsae_sha256,
+ rsa_pss_rsae_sha384,
+ rsa_pss_rsae_sha512,
+ rsa_pss_pss_sha256,
+ rsa_pss_pss_sha384,
+ rsa_pss_pss_sha512,
+ rsa_pkcs1_sha1,
+ ecdsa_sha1]
+ ]).
+
+supported_versions(?'TLS_v1.3') ->
+ oneof([[{3,4}],
+ [{3,3},{3,4}],
+ [{3,4},{3,3},{3,2},{3,1},{3,0}]
+ ]);
+supported_versions(_) ->
+ oneof([[{3,3}],
+ [{3,3},{3,2}],
+ [{3,3},{3,2},{3,1},{3,0}]
+ ]).
key_update() ->
#key_update{request_update = request_update()}.