1 Star 0 Fork 41

xh / openldap

forked from src-openEuler / openldap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-openldap-nss-ciphers-use-nss-defaults.patch 745 Bytes
一键复制 编辑 原始数据 按行查看 历史
Anonymous_Z 提交于 2019-12-29 17:30 . init
diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c
index fb5554e..7d5ffea 100644
--- a/libraries/libldap/tls_m.c
+++ b/libraries/libldap/tls_m.c
@@ -557,7 +557,16 @@ nss_parse_ciphers(const char *cipherstr, int cipher_list[ciphernum])
}
} else if (!strcmp(cipher, "DEFAULT")) {
for (i=0; i<ciphernum; i++) {
- cipher_list[i] = ciphers_def[i].enabled == SSL_ALLOWED ? 1 : 0;
+ PRBool enabled;
+ if (SSL_CipherPrefGetDefault(ciphers_def[i].num, &enabled) == SECSuccess) {
+ if (!(ciphers_def[i].attr & SSL_eNULL)) {
+ cipher_list[i] = enabled == SSL_ALLOWED ? 1 : 0;
+ } else {
+ cipher_list[i] = -1;
+ }
+ } else {
+ cipher_list[i] = -1;
+ }
}
} else {
int mask = 0;
1
https://gitee.com/xinghe_1/openldap.git
git@gitee.com:xinghe_1/openldap.git
xinghe_1
openldap
openldap
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891