curl - NSS : client certificate not found (nickname not specified)?

标签 curl openssl centos libcurl centos6

我正在尝试通过 Centos 6 系统上的 PHP curl 访问第三方服务,该系统附带针对 NSS 而不是 OpenSSL 编译的 curl 和 libcurl。

这给我带来了问题,每次我尝试访问该服务时,我都会收到此错误 NSS: client certificate not found (nickname not specified)

我的理解是我需要在 NSS 数据库中安装证书。

我正在寻找有关如何执行此操作的分步说明(请记住,我需要它来处理从 Nginx 服务器调用的 PHP curl 函数)

谢谢

最佳答案

尝试在证书文件名前加上“./”前缀,或使用完整路径。来自 curl 联机帮助页:

If curl is built against the NSS SSL library then this option [--cert] can tell curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib- nsspem.so) is available then PEM files may be loaded. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname.

(强调我的)

或者,这里有一些导入 NSS 证书数据库的说明,虽然我没有用过: http://rcritten.fedorapeople.org/nss_compat_ossl.html

关于curl - NSS : client certificate not found (nickname not specified)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15773806/

相关文章:

docker - 在 LinuxOne docker (s390x) 上构建 Fiware Orion 上下文代理

linux - CentOS 字体的名称是什么?

php - PostgreSQL Base64 图像解码问题

php - 如何安全连接以获得安全 cookie

http - curl 能够从 https 获取;但来自 golang 的 http.get(),相同的 https URL 不起作用

ssl - 将 ENGINE 上下文附加到 SSL_CTX

linux - 无法在 LinuxMint 上构建 openssl-1.0.2n

curl - Elasticsearch 中一个查询中的多个通配符

openssl 将 apple .cer 转换为 .p12 我只有一个文件 cer

linux - 失去互联网连接 : IP address using CentOS