1) Create a self-signed certificate
openssl x509 -in cert.pem -inform PEM -noout -subject
openssl x509 -in cert.pem -inform PEM -noout -issuer
Self-signed certificate have the same subject and issuer
- Generate a private key
openssl genrsa -des3 -out private_key.pem 2048 - Generate a certificate signing request for the private key
openssl req -new -key private_key.pem -out cert.csr - Remove passphrase from the private key
openssl rsa -in private_key.pem -out key.perm - Generate a self-signed certificate
openssl x509 -req -days 365 -in cert.csr -signkey key.pem -out self_signed.crt
openssl x509 -in cert.pem -inform PEM -noout -subject
openssl x509 -in cert.pem -inform PEM -noout -issuer
Self-signed certificate have the same subject and issuer