【发布时间】:2019-11-01 02:43:35
【问题描述】:
使用节点创建 CA
这是使用 OpenSSL 创建证书的方法 OpenSSL Certificate Authority
我试过pem
这是我关闭的问题can't create CSR from private key #244 GitHub
当我尝试生成 CSR
var csrOptions = {
clientKey: '/root/ca/intermediate/private/client.key.pem',
clientKeyPassword: '123456',
hash: 'sha256',
country: 'US',
state: 'California',
locality: 'Mountain View',
organization: 'Alice Ltd',
organizationUnit: 'Alice Ltd Web Services',
commonName: 'pass:client',
}
pem.createCSR( csrOptions , function(err, csr) {
if (err) {
throw err
} else {
console.log(csr.clientKey)
console.log(csr.csr)
}
});
我收到此错误
/root/sslnode/index2.js:37
抛出错误 ^
% openssl req -new -sha256 -config /root/ca/intermediate/openssl.cnf -key /tmp/54f976cb9cbd0e2dd53b755badb6e6e3fe2256ad -passin 文件:/tmp/3f4640f1d95ca955f1c44c7f2c4b729347813a5f
无法加载私钥 140563986715072:error:0906D06C:PEM 例程:PEM_read_bio:no start >line:../crypto/pem/pem_lib.c:691:Expecting: ANY PRIVATE KEY
【问题讨论】:
标签: node.js certificate-authority