From c7ce9238217a2d0ca5bfbdeb25922495ef1d584a Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Thu, 29 Aug 2013 10:10:55 +0200 Subject: 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. --- lib/ssl/src/tls_handshake.erl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/ssl/src') 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(<>, Acc) -> - EllipticCurveListLen = Len - 2, - <> = ExtData, + <> = ExtData, EllipticCurves = [ssl_tls1:enum_to_oid(X) || <> <= EllipticCurveList], dec_hello_extensions(Rest, [{elliptic_curves, #elliptic_curves{elliptic_curve_list = EllipticCurves}} | Acc]); dec_hello_extensions(<>, Acc) -> - ECPointFormatListLen = Len - 1, - <> = ExtData, + <> = ExtData, ECPointFormats = binary_to_list(ECPointFormatList), dec_hello_extensions(Rest, [{ec_point_formats, #ec_point_formats{ec_point_format_list = ECPointFormats}} | Acc]); -- cgit v1.2.3