Avoid PEM pass phrase

我在制作 SSL key file 时输入了一个 pass phrase。CA 把 SSL 证书发给我后,我在 Nignx 试着加载 key 和 证书,发现每次重启 Nginx 时,都会被要求 Enter PEM pass phrase。岂不很烦,而且万一服务器重启,岂不还要人工干预才能重启 web server?

原本以为把 pass phrase 从 key 文件里拿掉后,要找 CA 重新制作证书,后来发现不用,证书跟 pass phrase 无关。Nginx 的文档没有提及,Apache 倒是有提:

If necessary, you can also create a decrypted PEM version (not recommended) of this RSA private key with:

openssl rsa -in server.key -out server.key.unsecure

拿到 pass phrase 后安全性自然降低了,不过完全值得。

Leave a comment

Your email address will not be published. Required fields are marked *