Allow "DHE" and "kDHE" as synonyms of "EDH" and "kEDH" when specifiying ciphers
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 19 Dec 2013 19:42:39 +0000 (14:42 -0500)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 9 Jan 2014 15:43:27 +0000 (15:43 +0000)
The standard terminology in https://tools.ietf.org/html/rfc5426 is
"DHE".  "openssl ciphers" outputs "DHE" (for the most part).  But
users of the library currently cannot specify "DHE", they must
currently specify "EDH".

This change allows users to specify the common term in cipher suite
strings without breaking backward compatibility.

ssl/ssl.h
ssl/ssl_ciph.c

index 1c8309eef78a3b75a8506cb6d49c0e07a99b1357..3c49a38ab0eff91c7ff70a69ea33853712519dac 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -244,7 +244,8 @@ extern "C" {
 #define SSL_TXT_kDHr           "kDHr" 
 #define SSL_TXT_kDHd           "kDHd"
 #define SSL_TXT_kDH            "kDH"
-#define SSL_TXT_kEDH           "kEDH"
+#define SSL_TXT_kEDH           "kEDH" /* alias for kDHE */
+#define SSL_TXT_kDHE           "kDHE"
 #define SSL_TXT_kKRB5          "kKRB5"
 #define SSL_TXT_kECDHr         "kECDHr"
 #define SSL_TXT_kECDHe         "kECDHe"
@@ -268,7 +269,8 @@ extern "C" {
 
 #define        SSL_TXT_DSS             "DSS"
 #define SSL_TXT_DH             "DH"
-#define SSL_TXT_EDH            "EDH" /* same as "kEDH:-ADH" */
+#define SSL_TXT_DHE            "DHE" /* same as "kDHE:-ADH" */
+#define SSL_TXT_EDH            "EDH" /* alias for DHE */
 #define SSL_TXT_ADH            "ADH"
 #define SSL_TXT_RSA            "RSA"
 #define SSL_TXT_ECDH           "ECDH"
index 60b1456eb21795821540ceb48c8a8b2a48c64bc2..846478483b0d58252da5b7d173ba0ebbfaabf37f 100644 (file)
@@ -242,6 +242,7 @@ static const SSL_CIPHER cipher_aliases[]={
        {0,SSL_TXT_kDHd,0,    SSL_kDHd,  0,0,0,0,0,0,0,0},
        {0,SSL_TXT_kDH,0,     SSL_kDHr|SSL_kDHd,0,0,0,0,0,0,0,0},
        {0,SSL_TXT_kEDH,0,    SSL_kEDH,  0,0,0,0,0,0,0,0},
+       {0,SSL_TXT_kDHE,0,    SSL_kEDH,  0,0,0,0,0,0,0,0},
        {0,SSL_TXT_DH,0,      SSL_kDHr|SSL_kDHd|SSL_kEDH,0,0,0,0,0,0,0,0},
 
        {0,SSL_TXT_kKRB5,0,   SSL_kKRB5, 0,0,0,0,0,0,0,0},
@@ -274,6 +275,7 @@ static const SSL_CIPHER cipher_aliases[]={
 
        /* aliases combining key exchange and server authentication */
        {0,SSL_TXT_EDH,0,     SSL_kEDH,~SSL_aNULL,0,0,0,0,0,0,0},
+       {0,SSL_TXT_DHE,0,     SSL_kEDH,~SSL_aNULL,0,0,0,0,0,0,0},
        {0,SSL_TXT_EECDH,0,   SSL_kECDHE,~SSL_aNULL,0,0,0,0,0,0,0},
        {0,SSL_TXT_ECDHE,0,   SSL_kECDHE,~SSL_aNULL,0,0,0,0,0,0,0},
        {0,SSL_TXT_NULL,0,    0,0,SSL_eNULL, 0,0,0,0,0,0},