diff options
author | Péter Dimitrov <[email protected]> | 2019-01-11 09:53:13 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2019-01-11 09:53:13 +0100 |
commit | e72e7e0c978b9a07a9eca6d48ac9028d8b0fa9a5 (patch) | |
tree | f508b8836e804912e84f9af8dafc5056c37a240e /lib/ssl | |
parent | 4f046cf919a001df378411b2c8ba35304a134868 (diff) | |
parent | 6a779d062bab33b0a27a8540df1dbbe08e143536 (diff) | |
download | otp-e72e7e0c978b9a07a9eca6d48ac9028d8b0fa9a5.tar.gz otp-e72e7e0c978b9a07a9eca6d48ac9028d8b0fa9a5.tar.bz2 otp-e72e7e0c978b9a07a9eca6d48ac9028d8b0fa9a5.zip |
Merge branch 'peterdmv/ssl/fix-failing-srp-tc'
* peterdmv/ssl/fix-failing-srp-tc:
ssl: Fix srp testcase fault
Change-Id: I0d7bf24e16bec0b61d385a6cd2ef81f334b9e397
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/test/ssl_handshake_SUITE.erl | 37 |
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), |