aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_handshake_SUITE.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-01-09 10:32:55 +0100
committerPéter Dimitrov <[email protected]>2019-01-09 10:32:55 +0100
commit6a779d062bab33b0a27a8540df1dbbe08e143536 (patch)
tree02421e243f5aac34bc52b78efc7a4d42f9ffda80 /lib/ssl/test/ssl_handshake_SUITE.erl
parent609e818e9e819f029bf6fc677240a08fd3e0ec1b (diff)
downloadotp-6a779d062bab33b0a27a8540df1dbbe08e143536.tar.gz
otp-6a779d062bab33b0a27a8540df1dbbe08e143536.tar.bz2
otp-6a779d062bab33b0a27a8540df1dbbe08e143536.zip
ssl: Fix srp testcase fault
Fix testcase fault introduced by the forward merge of peterdmv/ssl/fix-srp-encode-decode/ERL-790/OTP-15477. Change-Id: Ia4290265d5c59b6d50f4e5b60b41d5f05fd14278
Diffstat (limited to 'lib/ssl/test/ssl_handshake_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_handshake_SUITE.erl37
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl
index fbdb452007..5392729af2 100644
--- a/lib/ssl/test/ssl_handshake_SUITE.erl
+++ b/lib/ssl/test/ssl_handshake_SUITE.erl
@@ -193,30 +193,29 @@ unorded_chain(Config) when is_list(Config) ->
ssl_certificate:certificate_chain(PeerCert, ets:new(foo, []), ExtractedCerts, UnordedChain).
encode_decode_srp(_Config) ->
- Exts = #hello_extensions{
- srp = #srp{username = <<"foo">>},
- sni = #sni{hostname = "bar"},
- renegotiation_info = undefined,
- signature_algs = undefined,
- alpn = undefined,
- next_protocol_negotiation = undefined,
- ec_point_formats = undefined,
- elliptic_curves = undefined
- },
- EncodedExts = <<0,20, % Length
+ Exts = #{srp => #srp{username = <<"foo">>},
+ sni => #sni{hostname = "bar"},
+ renegotiation_info => undefined,
+ signature_algs => undefined,
+ alpn => undefined,
+ next_protocol_negotiation => undefined,
+ ec_point_formats => undefined,
+ elliptic_curves => undefined
+ },
+ EncodedExts0 = <<0,20, % Length
+ 0,12, % SRP extension
+ 0,4, % Length
+ 3, % srp_I length
+ 102,111,111, % username = "foo"
0,0, % SNI extension
0,8, % Length
0,6, % ServerNameLength
0, % NameType (host_name)
0,3, % HostNameLength
- 98,97,114, % hostname = "bar"
- 0,12, % SRP extension
- 0,4, % Length
- 3, % srp_I length
- 102,111,111>>, % username = "foo"
- EncodedExts = ssl_handshake:encode_hello_extensions(Exts),
- Exts = ssl_handshake:decode_hello_extensions({client, EncodedExts}).
-
+ 98,97,114>>, % hostname = "bar"
+ EncodedExts0 = <<?UINT16(_),EncodedExts/binary>> =
+ ssl_handshake:encode_hello_extensions(Exts),
+ Exts = ssl_handshake:decode_hello_extensions(EncodedExts, {3,3}, client).
signature_algorithms(Config) ->
Opts = proplists:get_value(server_opts, Config),