From 50a75c536b50ac2513a846256ba7798e911c1302 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Thu, 25 Apr 2013 17:43:05 +0200 Subject: ssl: Fix Curve selection --- lib/ssl/src/ssl_connection.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 574032d14a..eb2fc5467d 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -423,7 +423,8 @@ hello(Hello = #client_hello{client_version = ClientVersion}, EcPointFormats, EllipticCurves, State#state{connection_states = ConnectionStates, negotiated_version = Version, - session = Session}); + session = Session, + client_ecc = {EllipticCurves, EcPointFormats}}); #alert{} = Alert -> handle_own_alert(Alert, ClientVersion, hello, State) end; @@ -3079,6 +3080,7 @@ handle_close_alert(Data, StateName, State0) -> ok end. +select_curve(#state{client_ecc = {[Curve|_], _}}) -> + {namedCurve, Curve}; select_curve(_) -> - %%TODO: select prefered curve from extension {namedCurve, ?secp256k1}. -- cgit v1.2.3