środa, 5 kwietnia 2023

Oneliner for generating a self-signed x.509 certificate for scripting purposes


There are cases when we'd need a quick way to generate x.509 certificate for scripting adhoc purposes without a need to create a CSR file or putting the values from the terminal by hand.


Tested with Centos 7/stream8. $yum install openssl -y


openssl req -subj '/CN=lol.mazia.rz/O=MZIARZ/C=US' -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 \
      -keyout /etc/httpd/certs/private-key.pem \
      -out /etc/httpd/certs/cert.pem
And here you go. Have fun.

Brak komentarzy:

Prześlij komentarz