|
|
86693f |
From 311a22b801693bf8b748169f35bde7bef744da8c Mon Sep 17 00:00:00 2001
|
|
|
86693f |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
86693f |
Date: Wed, 29 Jan 2014 12:55:36 +0100
|
|
|
86693f |
Subject: [PATCH 1/2] nss: do not fail if NSS does not implement a cipher
|
|
|
86693f |
|
|
|
86693f |
... that the user does not ask for
|
|
|
86693f |
|
|
|
86693f |
[upstream commit e15e73b741a2ddc88d166d2cec86d2bebb5d349e]
|
|
|
86693f |
---
|
|
|
86693f |
lib/nss.c | 9 +++++----
|
|
|
86693f |
1 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
86693f |
|
|
|
86693f |
diff --git a/lib/nss.c b/lib/nss.c
|
|
|
86693f |
index a2c5c63..c4ffe7b 100644
|
|
|
86693f |
--- a/lib/nss.c
|
|
|
86693f |
+++ b/lib/nss.c
|
|
|
86693f |
@@ -192,14 +192,13 @@ static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
|
|
|
86693f |
PRBool cipher_state[NUM_OF_CIPHERS];
|
|
|
86693f |
PRBool found;
|
|
|
86693f |
char *cipher;
|
|
|
86693f |
- SECStatus rv;
|
|
|
86693f |
|
|
|
86693f |
/* First disable all ciphers. This uses a different max value in case
|
|
|
86693f |
* NSS adds more ciphers later we don't want them available by
|
|
|
86693f |
* accident
|
|
|
86693f |
*/
|
|
|
86693f |
for(i=0; i
|
|
|
86693f |
- SSL_CipherPrefSet(model, SSL_ImplementedCiphers[i], SSL_NOT_ALLOWED);
|
|
|
86693f |
+ SSL_CipherPrefSet(model, SSL_ImplementedCiphers[i], PR_FALSE);
|
|
|
86693f |
}
|
|
|
86693f |
|
|
|
86693f |
/* Set every entry in our list to false */
|
|
|
86693f |
@@ -239,8 +238,10 @@ static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
|
|
|
86693f |
|
|
|
86693f |
/* Finally actually enable the selected ciphers */
|
|
|
86693f |
for(i=0; i
|
|
|
86693f |
- rv = SSL_CipherPrefSet(model, cipherlist[i].num, cipher_state[i]);
|
|
|
86693f |
- if(rv != SECSuccess) {
|
|
|
86693f |
+ if(!cipher_state[i])
|
|
|
86693f |
+ continue;
|
|
|
86693f |
+
|
|
|
86693f |
+ if(SSL_CipherPrefSet(model, cipherlist[i].num, PR_TRUE) != SECSuccess) {
|
|
|
86693f |
failf(data, "cipher-suite not supported by NSS: %s", cipherlist[i].name);
|
|
|
86693f |
return SECFailure;
|
|
|
86693f |
}
|
|
|
86693f |
--
|
|
|
86693f |
1.7.1
|
|
|
86693f |
|
|
|
86693f |
|
|
|
86693f |
From 9fe38c72787ba6658456a30477d48fe7960947ed Mon Sep 17 00:00:00 2001
|
|
|
86693f |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
86693f |
Date: Wed, 29 Jan 2014 13:03:46 +0100
|
|
|
86693f |
Subject: [PATCH 2/2] nss: do not use the NSS_ENABLE_ECC define
|
|
|
86693f |
|
|
|
86693f |
It is not provided by NSS public headers.
|
|
|
86693f |
|
|
|
86693f |
Bug: https://bugzilla.redhat.com/1058776
|
|
|
86693f |
|
|
|
86693f |
[upstream commit 665c160f0a4635565b44704ca281d2a03e715d6d]
|
|
|
86693f |
---
|
|
|
86693f |
lib/nss.c | 2 --
|
|
|
86693f |
1 files changed, 0 insertions(+), 2 deletions(-)
|
|
|
86693f |
|
|
|
86693f |
diff --git a/lib/nss.c b/lib/nss.c
|
|
|
86693f |
index c4ffe7b..111982f 100644
|
|
|
86693f |
--- a/lib/nss.c
|
|
|
86693f |
+++ b/lib/nss.c
|
|
|
86693f |
@@ -126,7 +126,6 @@ static const cipher_s cipherlist[] = {
|
|
|
86693f |
/* AES ciphers. */
|
|
|
86693f |
{"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA},
|
|
|
86693f |
{"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA},
|
|
|
86693f |
-#ifdef NSS_ENABLE_ECC
|
|
|
86693f |
/* ECC ciphers. */
|
|
|
86693f |
{"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA},
|
|
|
86693f |
{"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA},
|
|
|
86693f |
@@ -153,7 +152,6 @@ static const cipher_s cipherlist[] = {
|
|
|
86693f |
{"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA},
|
|
|
86693f |
{"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA},
|
|
|
86693f |
{"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA},
|
|
|
86693f |
-#endif
|
|
|
86693f |
};
|
|
|
86693f |
|
|
|
86693f |
/* following ciphers are new in NSS 3.4 and not enabled by default, therefore
|
|
|
86693f |
--
|
|
|
86693f |
1.7.1
|
|
|
86693f |
|