diff options
author | András Veres-Szentkirályi <[email protected]> | 2014-06-05 17:38:44 +0200 |
---|---|---|
committer | András Veres-Szentkirályi <[email protected]> | 2014-06-05 17:38:44 +0200 |
commit | 34e4094aabccc22b5b1be609eb8dfbe412dd4328 (patch) | |
tree | 7b6bf0ee3580d9a0a29ca069cc18cb0e2139b97f | |
parent | 2bed3437aee3f9519cdffa75e13cd8dd3306f954 (diff) | |
download | otp-34e4094aabccc22b5b1be609eb8dfbe412dd4328.tar.gz otp-34e4094aabccc22b5b1be609eb8dfbe412dd4328.tar.bz2 otp-34e4094aabccc22b5b1be609eb8dfbe412dd4328.zip |
added SNI decode test to SSL handshake suite
-rw-r--r-- | lib/ssl/test/ssl_handshake_SUITE.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl index 5f36842f9e..e5e942ce1b 100644 --- a/lib/ssl/test/ssl_handshake_SUITE.erl +++ b/lib/ssl/test/ssl_handshake_SUITE.erl @@ -38,6 +38,7 @@ all() -> [decode_hello_handshake, decode_supported_elliptic_curves_hello_extension_correctly, decode_unknown_hello_extension_correctly, encode_single_hello_sni_extension_correctly, + decode_single_hello_sni_extension_correctly, select_proper_tls_1_2_rsa_default_hashsign]. %%-------------------------------------------------------------------- @@ -98,6 +99,13 @@ encode_single_hello_sni_extension_correctly(_Config) -> Encoded = ssl_handshake:encode_hello_extensions(Exts), HelloExt = Encoded. +decode_single_hello_sni_extension_correctly(_Config) -> + Exts = #hello_extensions{sni = #sni{hostname = "test.com"}}, + SNI = <<16#00, 16#00, 16#00, 16#0d, 16#00, 16#0b, 16#00, 16#00, 16#08, + $t, $e, $s, $t, $., $c, $o, $m>>, + Decoded = ssl_handshake:decode_hello_extensions(SNI), + Exts = Decoded. + select_proper_tls_1_2_rsa_default_hashsign(_Config) -> % RFC 5246 section 7.4.1.4.1 tells to use {sha1,rsa} as default signature_algorithm for RSA key exchanges {sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,3}), |