Ignore -named_curve auto value to improve backwards compatibility
authorTomas Mraz <tmraz@fedoraproject.org>
Mon, 22 May 2017 14:20:21 +0000 (16:20 +0200)
committerMatt Caswell <matt@openssl.org>
Thu, 8 Jun 2017 20:30:17 +0000 (21:30 +0100)
Fixes #3490

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3518)
(cherry picked from commit 1c7aa0dbf16c3389bbedd13391bb653e7a189603)

CHANGES
ssl/ssl_conf.c

diff --git a/CHANGES b/CHANGES
index 52d1fb42dd5aee0ba95bbb7534b307abfaac9f30..f13c6d11f46a954a2df9a1d53e58dbe94a05690f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,7 +9,9 @@
 
  Changes between 1.1.0f and 1.1.0g [xx XXX xxxx]
 
-  *)
+  *) Ignore the '-named_curve auto' value for compatibility of applications
+     with OpenSSL 1.0.2.
+     [Tomas Mraz <tmraz@fedoraproject.org>]
 
  Changes between 1.1.0e and 1.1.0f [25 May 2017]
 
index 39579460926036f43601c8a6c8b98b6447841573..88e41038203778024e90188e7a52c44702023af2 100644 (file)
@@ -221,6 +221,14 @@ static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value)
     EC_KEY *ecdh;
     int nid;
 
+    /* Ignore values supported by 1.0.2 for the automatic selection */
+    if ((cctx->flags & SSL_CONF_FLAG_FILE) &&
+        strcasecmp(value, "+automatic") == 0)
+        return 1;
+    if ((cctx->flags & SSL_CONF_FLAG_CMDLINE) &&
+        strcmp(value, "auto") == 0)
+        return 1;
+
     nid = EC_curve_nist2nid(value);
     if (nid == NID_undef)
         nid = OBJ_sn2nid(value);