使用 https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=3&nav=0,33我生成了“server.csr”以进一步创建公共(public)证书。然后我得到了两个加密 key 。我尝试相应地在 config.tcl 中进行更改,但项目开放应用程序仍然指向本地证书。config.tcl的部分代码,我做了如下修改:
ns_section ns/server/${server}/module/nsopenssl/sslcontexts
ns_param users "SSL context used for regular user access"
ns_section ns/server/${server}/module/nsopenssl/defaults
ns_param server users
ns_section ns/server/${server}/module/nsopenssl/sslcontext/users
ns_param Role server
ns_param ModuleDir ${serverroot}/etc/certs/
ns_param CertFile newcert.pem
ns_param KeyFile keyfile.pem
ns_param CADir ca
ns_param CAFile shipo_cert.txt
ns_param Protocols "SSLv2, SSLv3, TLSv1"
ns_param CipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP"
ns_param PeerVerify false
ns_param PeerVerifyDepth 3
ns_param Trace false
shipo_cert.txt 是随证书一起提供的证书shipo_interm.txt.
我搜索并尽我所能,但无法做到。请帮我解决这个问题。
附言project-open 实例已经在使用 openssl 使用自签名证书。但我的组织希望它使用他们提供的证书运行
DF > Have you packed your private key and the signed public key,
DF > together with the CA keychain, into a .p12 file yet?
Victor > how to do that? please guide me through
之前已在 Adding an intermediate certificates to a pkcs12 file in JBoss 回答过这个问题.
假设您有 example.com 的证书和私钥:
openssl pkcs12 -export -in www-example-com.crt -inkey www.example.key -out www-example-com.p12
确保您的证书(上面的www-example-com.crt
)具有构建有效链所需的所有中间证书;而且不只是服务器的证书。这意味着 www-example-com.crt
将有多个 PEM 条目。
用下面的方法测试它。 ca.pem
是您的 CA 的根证书。
echo -e "GET / HTTP/1.0\r\n" | openssl s_client -connect example.com:443 -CAfile ca.pem
您应该以 Verify return code: 0 (ok)
结束。
我是一名优秀的程序员,十分优秀!