26
我正在写一个shell脚本中使用OpenSSL的签名证书:注册证书
openssl ca -config "$CONF" -out "$BOXCERT" -infiles "$CSRFILE"
但是,在运行时,OpenSSL的总是问我是否要对证书签名:
Certificate is to be certified until Mar 19 11:50:33 2023 GMT (3653 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
我想脚本在服务器中非交互式运行。是否有一些命令行参数或配置文件选项告诉OpenSSL签署证书并提交而不提示?
它的工作原理,谢谢。 – 2013-03-18 13:51:04
如果你的ca键有通过短语,那么你也可以使用环境变量和命令行密码等各种选项来指定它。否则会提示你。这里是一个简单的命令,你可以将pass口令作为命令的一部分传递给你* openssl ca -batch -config“$ CONF”-passin pass:keypassword -out“$ BOXCERT”-infiles“$ CSRFILE”* – 2016-02-11 18:03:42