lkundrak / rpms / sendmail

Forked from rpms/sendmail 4 years ago
Clone
a8b1301
diff --git a/sendmail/tls.c b/sendmail/tls.c
a8b1301
index 16cb93f..9338380 100644
a8b1301
--- a/sendmail/tls.c
a8b1301
+++ b/sendmail/tls.c
a8b1301
@@ -1329,13 +1329,8 @@ inittls(ctx, req, options, srv, certfile, keyfile, cacertpath, cacertfile, dhpar
a8b1301
 		}
a8b1301
 
a8b1301
 #if _FFR_TLS_EC
a8b1301
-		ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
a8b1301
-		if (ecdh != NULL)
a8b1301
-		{
a8b1301
-			SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_ECDH_USE);
a8b1301
-			SSL_CTX_set_tmp_ecdh(*ctx, ecdh);
a8b1301
-			EC_KEY_free(ecdh);
a8b1301
-		}
a8b1301
+		SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_ECDH_USE);
a8b1301
+		SSL_CTX_set_ecdh_auto(*ctx, 1);
a8b1301
 #endif /* _FFR_TLS_EC */
a8b1301
 
a8b1301
 	}