diff options
author | Ingela Anderton Andin <[email protected]> | 2013-08-29 10:10:55 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-09-02 09:39:21 +0200 |
commit | c7ce9238217a2d0ca5bfbdeb25922495ef1d584a (patch) | |
tree | c129659efec88eaa1770bf908716cab36e0be835 /lib/ssl/src/tls_handshake.erl | |
parent | c2045419346ea46f3f8ad89dfedd5169adb7c9c4 (diff) | |
download | otp-c7ce9238217a2d0ca5bfbdeb25922495ef1d584a.tar.gz otp-c7ce9238217a2d0ca5bfbdeb25922495ef1d584a.tar.bz2 otp-c7ce9238217a2d0ca5bfbdeb25922495ef1d584a.zip |
ssl: Skip second length indicator in EC extensions
We have no need to care about the value of this length indicator so
we do not need to match it or verify it, it is unnecessary work.
Diffstat (limited to 'lib/ssl/src/tls_handshake.erl')
-rw-r--r-- | lib/ssl/src/tls_handshake.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl index fdd696c0b1..bd2e02449b 100644 --- a/lib/ssl/src/tls_handshake.erl +++ b/lib/ssl/src/tls_handshake.erl @@ -1344,16 +1344,14 @@ dec_hello_extensions(<<?UINT16(?SIGNATURE_ALGORITHMS_EXT), ?UINT16(Len), dec_hello_extensions(<<?UINT16(?ELLIPTIC_CURVES_EXT), ?UINT16(Len), ExtData:Len/binary, Rest/binary>>, Acc) -> - EllipticCurveListLen = Len - 2, - <<?UINT16(EllipticCurveListLen), EllipticCurveList/binary>> = ExtData, + <<?UINT16(_), EllipticCurveList/binary>> = ExtData, EllipticCurves = [ssl_tls1:enum_to_oid(X) || <<X:16>> <= EllipticCurveList], dec_hello_extensions(Rest, [{elliptic_curves, #elliptic_curves{elliptic_curve_list = EllipticCurves}} | Acc]); dec_hello_extensions(<<?UINT16(?EC_POINT_FORMATS_EXT), ?UINT16(Len), ExtData:Len/binary, Rest/binary>>, Acc) -> - ECPointFormatListLen = Len - 1, - <<?BYTE(ECPointFormatListLen), ECPointFormatList/binary>> = ExtData, + <<?BYTE(_), ECPointFormatList/binary>> = ExtData, ECPointFormats = binary_to_list(ECPointFormatList), dec_hello_extensions(Rest, [{ec_point_formats, #ec_point_formats{ec_point_format_list = ECPointFormats}} | Acc]); |