Home | History | Annotate | Download | only in patches
      1 From cf389e16d8dc49e97c0b13ea3a1c373c6f6f94bd Mon Sep 17 00:00:00 2001
      2 From: Adam Langley <agl (a] chromium.org>
      3 Date: Wed, 4 Jun 2014 10:59:32 -0700
      4 Subject: ECDHE-PSK_AES-CBC-SHA_cipher_suites
      5 
      6 Add ECDHE-PSK AES-CBC-SHA cipher suites from RFC 5489.
      7 Remove ECDHE-PSK AES-CBC-SHA2 cipher suites from RFC 5489 because
      8 they cannot be used with SSLv3 and there's no way to express that in
      9 OpenSSL's configuration.
     10 ---
     11  ssl/s3_lib.c | 25 ++++++++++++-------------
     12  ssl/tls1.h   | 14 ++++++++------
     13  2 files changed, 20 insertions(+), 19 deletions(-)
     14 
     15 diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
     16 index f84da7f..e016fc8 100644
     17 --- a/ssl/s3_lib.c
     18 +++ b/ssl/s3_lib.c
     19 @@ -2828,35 +2828,34 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
     20  
     21  #ifndef OPENSSL_NO_PSK
     22      /* ECDH PSK ciphersuites from RFC 5489 */
     23 -
     24 -	/* Cipher C037 */
     25 +	/* Cipher C035 */
     26  	{
     27  	1,
     28 -	TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
     29 -	TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
     30 +	TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA,
     31 +	TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA,
     32  	SSL_kEECDH,
     33  	SSL_aPSK,
     34  	SSL_AES128,
     35 -	SSL_SHA256,
     36 +	SSL_SHA1,
     37  	SSL_TLSV1,
     38 -	SSL_NOT_EXP|SSL_HIGH,
     39 -	SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF_SHA256,
     40 +	SSL_NOT_EXP|SSL_HIGH|SSL_FIPS,
     41 +	SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
     42  	128,
     43  	128,
     44  	},
     45  
     46 -	/* Cipher C038 */
     47 +	/* Cipher C036 */
     48  	{
     49  	1,
     50 -	TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
     51 -	TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
     52 +	TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA,
     53 +	TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA,
     54  	SSL_kEECDH,
     55  	SSL_aPSK,
     56  	SSL_AES256,
     57 -	SSL_SHA384,
     58 +	SSL_SHA1,
     59  	SSL_TLSV1,
     60 -	SSL_NOT_EXP|SSL_HIGH,
     61 -	SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF_SHA384,
     62 +	SSL_NOT_EXP|SSL_HIGH|SSL_FIPS,
     63 +	SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF,
     64  	256,
     65  	256,
     66  	},
     67 diff --git a/ssl/tls1.h b/ssl/tls1.h
     68 index ec8948d..51d073d 100644
     69 --- a/ssl/tls1.h
     70 +++ b/ssl/tls1.h
     71 @@ -531,9 +531,11 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
     72  #define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256        0x0300C031
     73  #define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384        0x0300C032
     74  
     75 -/* ECDHE PSK ciphersuites from RFC 5489 */
     76 -#define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256    0x0300C037
     77 -#define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384    0x0300C038
     78 +/* ECDHE PSK ciphersuites from RFC5489
     79 + * SHA-2 cipher suites are omitted because they cannot be used safely with
     80 + * SSLv3. */
     81 +#define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA          0x0300C035
     82 +#define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA          0x0300C036
     83  
     84  /* XXX
     85   * Inconsistency alert:
     86 @@ -686,9 +688,9 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
     87  #define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256       "ECDH-RSA-AES128-GCM-SHA256"
     88  #define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384       "ECDH-RSA-AES256-GCM-SHA384"
     89  
     90 -/* ECDHE PSK ciphersuites from RFC 5489 */
     91 -#define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256  "ECDHE-PSK-WITH-AES-128-CBC-SHA256"
     92 -#define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384  "ECDHE-PSK-WITH-AES-256-CBC-SHA384"
     93 +/* ECDHE PSK ciphersuites from RFC5489 */
     94 +#define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA         "ECDHE-PSK-AES128-CBC-SHA"
     95 +#define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA         "ECDHE-PSK-AES256-CBC-SHA"
     96  
     97  #define TLS_CT_RSA_SIGN			1
     98  #define TLS_CT_DSS_SIGN			2
     99 -- 
    100 2.0.0.526.g5318336
    101