CA.pl -newcert (openssl req -config /etc/openssl.cnf -new -x509 -keyout newreq.pem \ -out newreq.pem -days 365) |
现在确保文件 index.txt 为空,并且文件 serial 包含 01。
您可能需要增加天数,以便当根证书过期时,您的根证书和由此根证书签名的所有证书不必更改。我认为专业的公司为其根证书使用 5 年到 10 年的有效期。
openssl req -config /etc/openssl.cnf -new -x509 -keyout private/cakey.pem \ -out cacert.pem -days 3650 |
最后一个命令比“CA.pl -newcert”更好,因为它会将文件放置在所需的位置并创建一个有效期为 10 年的根 CA。