openssl证书转换

创建时间:2023-01-16 10:43:18
栏目:linux
标签:opensslrsa
#rsa 私钥算普通公钥
openssl rsa -in newclient_privatekey.pem -pubout
#rsa 私钥算rs公钥
openssl rsa -in newclient_privatekey.pem -RSAPublicKey_out
#PKCS1私钥转换为PKCS8
openssl pkcs8 -topk8 -inform PEM -in private.pem -outform pem -nocrypt -out pkcs8.pem
#PKCS8格式私钥再转换为PKCS1格式
openssl rsa -in pkcs8.pem -out pkcs1.pem
#从pkcs1私钥中生成pkcs8公钥
openssl rsa -in private.pem -pubout -out public.pem
#从pkcs8私钥中生成pkcs8公钥
openssl rsa -in pkcs8.pem -pubout -out public_pkcs8.pem
#pkcs8公钥转pkcs1公钥
openssl rsa -pubin -in public.pem -RSAPublicKey_out
#pkcs1公钥转换为pkcs8公钥
openssl rsa -RSAPublicKey_in -in pub_pkcs1.pem -pubout

原文见于:https://www.codenong.com/18039401/ https://www.cnblogs.com/cocoajin/p/10510574.html

联系我们

微信号:shidaping023