From: Alon Bar-Lev Date: Tue, 12 Nov 2013 00:27:22 +0200 Message-Id: <1384208842-25700-1-git-send-email-alon.barlev@...277...> Subject: [Openvpn-devel] [PATCH] ssl: enable basic ecdsa List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Openvpn-devel@lists.sourceforge.net Cc: sanaullah82@...277... From: Jan Just Keijser Discussion: https://forums.openvpn.net/topic8404-30.html Tested-By: Sanaullah --- src/openvpn/ssl_openssl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index f64177a..665bb5c 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -309,6 +309,7 @@ tls_ctx_load_dh_params (struct tls_root_ctx *ctx, const char *dh_file, { DH *dh; BIO *bio; + EC_KEY *ecdh=NULL; ASSERT(NULL != ctx); @@ -336,6 +337,16 @@ tls_ctx_load_dh_params (struct tls_root_ctx *ctx, const char *dh_file, 8 * DH_size (dh)); DH_free (dh); + + ecdh = EC_KEY_new_by_curve_name(NID_secp224r1); + + if (ecdh == NULL) + msg (M_SSLERR, "Unable to create curve (NID_secp224r1)"); + + if (!SSL_CTX_set_tmp_ecdh(ctx->ctx, ecdh)) + msg (M_SSLERR, "SSL_CTX_set_tmp_ecdh"); + + EC_KEY_free(ecdh); } int -- 1.8.3.2