c260e0
From 301f5142f8eac474ff3f92d83450cdd3b023c92b Mon Sep 17 00:00:00 2001
c260e0
From: Kamil Dudka <kdudka@redhat.com>
c260e0
Date: Mon, 19 Sep 2016 16:37:05 +0200
c260e0
Subject: [PATCH 1/3] nss: fix typo in ecdhe_rsa_null cipher suite string
c260e0
c260e0
As it seems to be a rarely used cipher suite (for securely established
c260e0
but _unencrypted_ connections), I believe it is fine not to provide an
c260e0
alias for the misspelled variant.
c260e0
c260e0
Upstream-commit: 75912202709e0f74a5bab91ef57254d7038f5f42
c260e0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
c260e0
---
c260e0
 lib/nss.c | 2 +-
c260e0
 1 file changed, 1 insertion(+), 1 deletion(-)
c260e0
c260e0
diff --git a/lib/nss.c b/lib/nss.c
c260e0
index 7b4fe57..d0db3cd 100644
c260e0
--- a/lib/nss.c
c260e0
+++ b/lib/nss.c
c260e0
@@ -144,7 +144,7 @@ static const cipher_s cipherlist[] = {
c260e0
   {"ecdh_rsa_3des_sha",          TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA},
c260e0
   {"ecdh_rsa_aes_128_sha",       TLS_ECDH_RSA_WITH_AES_128_CBC_SHA},
c260e0
   {"ecdh_rsa_aes_256_sha",       TLS_ECDH_RSA_WITH_AES_256_CBC_SHA},
c260e0
-  {"echde_rsa_null",             TLS_ECDHE_RSA_WITH_NULL_SHA},
c260e0
+  {"ecdhe_rsa_null",             TLS_ECDHE_RSA_WITH_NULL_SHA},
c260e0
   {"ecdhe_rsa_rc4_128_sha",      TLS_ECDHE_RSA_WITH_RC4_128_SHA},
c260e0
   {"ecdhe_rsa_3des_sha",         TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA},
c260e0
   {"ecdhe_rsa_aes_128_sha",      TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
c260e0
-- 
c260e0
2.7.4
c260e0
c260e0
c260e0
From 3b11781032d9c04ba8a9500899339a4758da4ad7 Mon Sep 17 00:00:00 2001
c260e0
From: Kamil Dudka <kdudka@redhat.com>
c260e0
Date: Mon, 19 Sep 2016 17:38:23 +0200
c260e0
Subject: [PATCH 2/3] nss: add cipher suites using SHA384 if supported by NSS
c260e0
c260e0
Upstream-commit: 049aa9254687f6738642bd73da9bf96d8af2a833
c260e0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
c260e0
---
c260e0
 lib/nss.c | 10 ++++++++++
c260e0
 1 file changed, 10 insertions(+)
c260e0
c260e0
diff --git a/lib/nss.c b/lib/nss.c
c260e0
index d0db3cd..16b0218 100644
c260e0
--- a/lib/nss.c
c260e0
+++ b/lib/nss.c
c260e0
@@ -174,6 +174,16 @@ static const cipher_s cipherlist[] = {
c260e0
   {"ecdhe_rsa_aes_128_gcm_sha_256",   TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
c260e0
   {"ecdh_rsa_aes_128_gcm_sha_256",    TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256},
c260e0
 #endif
c260e0
+#ifdef TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
c260e0
+  /* cipher suites using SHA384 */
c260e0
+  {"rsa_aes_256_gcm_sha_384",         TLS_RSA_WITH_AES_256_GCM_SHA384},
c260e0
+  {"dhe_rsa_aes_256_gcm_sha_384",     TLS_DHE_RSA_WITH_AES_256_GCM_SHA384},
c260e0
+  {"dhe_dss_aes_256_gcm_sha_384",     TLS_DHE_DSS_WITH_AES_256_GCM_SHA384},
c260e0
+  {"ecdhe_ecdsa_aes_256_sha_384",     TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384},
c260e0
+  {"ecdhe_rsa_aes_256_sha_384",       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384},
c260e0
+  {"ecdhe_ecdsa_aes_256_gcm_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384},
c260e0
+  {"ecdhe_rsa_aes_256_gcm_sha_384",   TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384},
c260e0
+#endif
c260e0
 };
c260e0
 
c260e0
 static const char* pem_library = "libnsspem.so";
c260e0
-- 
c260e0
2.7.4
c260e0
c260e0
c260e0
From e796e68d2f1ef647a91afa10deb0986e082a14be Mon Sep 17 00:00:00 2001
c260e0
From: Kamil Dudka <kdudka@redhat.com>
c260e0
Date: Mon, 19 Sep 2016 17:45:53 +0200
c260e0
Subject: [PATCH 3/3] nss: add chacha20-poly1305 cipher suites if supported by
c260e0
 NSS
c260e0
c260e0
Upstream-commit: d1f1c857ad559eafef9373621d30174c046261ef
c260e0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
c260e0
---
c260e0
 lib/nss.c | 9 +++++++++
c260e0
 1 file changed, 9 insertions(+)
c260e0
c260e0
diff --git a/lib/nss.c b/lib/nss.c
c260e0
index 16b0218..36c100d 100644
c260e0
--- a/lib/nss.c
c260e0
+++ b/lib/nss.c
c260e0
@@ -184,6 +184,15 @@ static const cipher_s cipherlist[] = {
c260e0
   {"ecdhe_ecdsa_aes_256_gcm_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384},
c260e0
   {"ecdhe_rsa_aes_256_gcm_sha_384",   TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384},
c260e0
 #endif
c260e0
+#ifdef TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
c260e0
+  /* chacha20-poly1305 cipher suites */
c260e0
+ {"ecdhe_rsa_chacha20_poly1305_sha_256",
c260e0
+     TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256},
c260e0
+ {"ecdhe_ecdsa_chacha20_poly1305_sha_256",
c260e0
+     TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256},
c260e0
+ {"dhe_rsa_chacha20_poly1305_sha_256",
c260e0
+     TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256},
c260e0
+#endif
c260e0
 };
c260e0
 
c260e0
 static const char* pem_library = "libnsspem.so";
c260e0
-- 
c260e0
2.7.4
c260e0