尝试与cURL连接时:
var newObj = {
"oname": data.oname,
"bun": data.bun.filter(function(d){ if( d.bid == 1 ) return true; } )
};
我错误:
curl 'https://example.com/' --cert ./newkey.pem -v -k
以前我删除了RSA私钥上的密码短语:
* About to connect() to some-host.com port 443 (#0)
* Trying 1.1.1.1... connected
* Connected to example.com (1.1.1.1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* Unable to load client cert -8018.
* NSS error -8018
* Closing connection #0
curl: (58) Unable to load client cert -8018.
但它没有解决我的问题。
openssl rsa -in key.pem -out newkey.pem
:
$ curl --version
但是,它适用于另一台计算机,但有一个不同的版本curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
。
正如我在本案例中所理解的,我需要将证书添加到NSS存储中,但如何做到这一点并不明白。请帮忙解决这个问题