Blame SOURCES/openldap-nss-ciphers-use-nss-defaults.patch

d198f9
Use what NSS considers default for DEFAULT cipher string.
d198f9
d198f9
Author: Matus Honek <mhonek@redhat.com>
d198f9
Resolves: #1245279
d198f9
d198f9
diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c
d198f9
--- a/libraries/libldap/tls_m.c
d198f9
+++ b/libraries/libldap/tls_m.c
d198f9
@@ -645,7 +645,16 @@ nss_parse_ciphers(const char *cipherstr, int cipher_list[ciphernum])
d198f9
 			}
d198f9
 		} else if (!strcmp(cipher, "DEFAULT")) {
d198f9
 			for (i=0; i
d198f9
-				cipher_list[i] = ciphers_def[i].enabled == SSL_ALLOWED ? 1 : 0;
d198f9
+				PRBool enabled;
d198f9
+				if (SSL_CipherPrefGetDefault(ciphers_def[i].num, &enabled) == SECSuccess) {
d198f9
+					if (!(ciphers_def[i].attr & SSL_eNULL)) {
d198f9
+						cipher_list[i] = enabled == SSL_ALLOWED ? 1 : 0;
d198f9
+					} else {
d198f9
+						cipher_list[i] = -1;
d198f9
+					}
d198f9
+				} else {
d198f9
+					cipher_list[i] = -1;
d198f9
+				}
d198f9
 			}
d198f9
 		} else {
d198f9
 			int mask = 0;