openssl: Create a selfsigned certificate


creating selfsigned certificate with openssl is one step 🙂

This command creates a 4096 Bit key ( myKey.key ) and the corresponding selfsigned public key (myCert.pem).

michael@debdev ~ # openssl req -x509 \
-newkey rsa:4096 \
-keyout myKey.key \
-out myCert.pem \
-sha256 \
-days 365 \
-batch \
-nodes \
-subj "/C=DE/ST=Franken/L=Nuremburg/O=my Organizaton/OU=My Department/"

If you don’t want to set a passphrase on the private key omit the -nodes switch.


Advertisment to support

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.