openssl req生成证书

  • 生成自签名CA证书

    openssl req -x509 -newkey rsa:2048 -keyout ca-key.pem -out ca.pem -noenc

  • 生成证书请求

    openssl req -newkey rsa:2048 -keyout key.pem -out req.pem -noenc

  • 签名证书

    openssl req -x509 -CA ca.pem -CAkey ca-key.pem -in req.pem -copy_extensions copy -out c.pem

Views: 0

评论

发表回复