Thursday, April 23, 2020

Create a self signed cert, convert .pem to .cer


Create private key:
openssl genrsa -out privkey.pem 2048
 
See what's inside the private key:
openssl rsa -noout -text -in privkey.pem

Create public key using the private key
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 3650

See what's inside the public key:
openssl x509 -in cacert.pem -text

Convert public key from .pem to .cer
openssl x509 -inform PEM -in cacert.pem -outform DER -out a.cer

No comments:

Blog Archive