aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-04-25 17:43:05 +0200
committerIngela Anderton Andin <[email protected]>2013-05-08 10:39:21 +0200
commit50a75c536b50ac2513a846256ba7798e911c1302 (patch)
tree4fdb4e34e25cd9e5af7344194245d05d82845550 /lib/ssl
parentbadb8f14e9829ce0a797b56702997aa355cdd9ba (diff)
downloadotp-50a75c536b50ac2513a846256ba7798e911c1302.tar.gz
otp-50a75c536b50ac2513a846256ba7798e911c1302.tar.bz2
otp-50a75c536b50ac2513a846256ba7798e911c1302.zip
ssl: Fix Curve selection
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/src/ssl_connection.erl6
1 files changed, 4 insertions, 2 deletions
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}.