diff options
author | Fredrik Gustafsson <[email protected]> | 2013-11-11 10:05:12 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-11-11 10:05:12 +0100 |
commit | a2d97b6405066c702678e891d0d3c7640b81d621 (patch) | |
tree | 5add7650f8d4599ba736ab5955b0abda31dd29cb /lib/ssl/test | |
parent | 7724137c2952a343a709fc9e2f1a44eb2e1fb584 (diff) | |
parent | 06d4f009136b853cd8b50a6b5e8ae0ff5bb54041 (diff) | |
download | otp-a2d97b6405066c702678e891d0d3c7640b81d621.tar.gz otp-a2d97b6405066c702678e891d0d3c7640b81d621.tar.bz2 otp-a2d97b6405066c702678e891d0d3c7640b81d621.zip |
Merge branch 'klyr/ssl_sni_client/OTP-11460' into maint
* klyr/ssl_sni_client/OTP-11460:
Update documentation
Add a new server_name_indication option to ssl:connect
Add SSL Server Name Indication (SNI) client support
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_handshake_SUITE.erl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl index 9695710230..7e8e8d2611 100644 --- a/lib/ssl/test/ssl_handshake_SUITE.erl +++ b/lib/ssl/test/ssl_handshake_SUITE.erl @@ -34,7 +34,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [decode_hello_handshake, decode_single_hello_extension_correctly, - decode_unknown_hello_extension_correctly]. + decode_unknown_hello_extension_correctly, + encode_single_hello_sni_extension_correctly]. %%-------------------------------------------------------------------- %% Test Cases -------------------------------------------------------- @@ -73,3 +74,12 @@ decode_unknown_hello_extension_correctly(_Config) -> Extensions = ssl_handshake:decode_hello_extensions(<<FourByteUnknown/binary, Renegotiation/binary>>), #renegotiation_info{renegotiated_connection = <<0>>} = Extensions#hello_extensions.renegotiation_info. + +encode_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>>, + ExtSize = byte_size(SNI), + HelloExt = <<ExtSize:16/unsigned-big-integer, SNI/binary>>, + Encoded = ssl_handshake:encode_hello_extensions(Exts), + HelloExt = Encoded. |