openssl 秘钥格式转换pem to der

#!/bin/bash
priname=rsa_private_key
pubname=rsa_public_key
openssl genrsa -out $priname.pem 2048
openssl rsa -in $priname.pem -pubout -out $pubname.pem -outform PEM
openssl rsa -in $priname.pem -out $priname.der -outform der
openssl rsa -in $pubname.pem -out $pubname.der -pubin -outform der

你可能感兴趣的:(安全,openssl,der,pem,格式转换,秘钥)