From 03f469365aebd6b9a10026bc31144849466d19c1 Mon Sep 17 00:00:00 2001 From: Frank Schoenmann Date: Wed, 25 Oct 2017 15:18:39 +0200 Subject: Perform OIDS lookup before to prevent a guaranteed exception in EC_Group. --- src/lib/tls/msg_client_kex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/tls') diff --git a/src/lib/tls/msg_client_kex.cpp b/src/lib/tls/msg_client_kex.cpp index 3291b6eb5..3d2f72e1c 100644 --- a/src/lib/tls/msg_client_kex.cpp +++ b/src/lib/tls/msg_client_kex.cpp @@ -181,7 +181,7 @@ Client_Key_Exchange::Client_Key_Exchange(Handshake_IO& io, } else { - EC_Group group(curve_name); + EC_Group group(OIDS::lookup(curve_name)); ECDH_PublicKey counterparty_key(group, OS2ECP(ecdh_key, group.get_curve())); policy.check_peer_key_acceptable(counterparty_key); ECDH_PrivateKey priv_key(rng, group); -- cgit v1.2.3 From a07a22449a97d8734944566be01ee76cb817b846 Mon Sep 17 00:00:00 2001 From: Frank Schoenmann Date: Wed, 25 Oct 2017 15:34:59 +0200 Subject: Added missing include. --- src/lib/tls/msg_client_kex.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/tls') diff --git a/src/lib/tls/msg_client_kex.cpp b/src/lib/tls/msg_client_kex.cpp index 3d2f72e1c..742fee6b5 100644 --- a/src/lib/tls/msg_client_kex.cpp +++ b/src/lib/tls/msg_client_kex.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include -- cgit v1.2.3