Openssl不从Openssl .cnf中读取默认值



我使用以下命令创建证书请求:

openssl req -config openssl.cnf -new -out [filename].csr -passout pass:[password]

openssl.cnf文件在我运行命令的目录中。
问题是,系统仍然提示我提交国家、州、地区等的值。
我想通过编程来完成,而不需要有人介入并输入这些值。openssl.cnf不应该提供要使用的默认值吗?我是不是错过了你们的争论?

正确的语法应该是:

openssl req -batch -config openssl.cnf -new -out [filename].csr -passout pass:[password]

一个2048b的RSA私钥将同时在'privkey.pem'中生成。
如果您希望为预先存在的密钥创建请求,请添加选项:

-key [keyfile]

最新更新