首页 > 代码库 > openssl生成私钥和公钥

openssl生成私钥和公钥

openssl生成私钥和公钥

by 伍雪颖

私钥:
openssl genrsa -out server.key 1024

公钥:
openssl rsa -in server.key -pubout -out server.pem

生成证书CSR文件:
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -in server.csr -signkey server.key -out server.crt

openssl生成私钥和公钥