Generating self-signed certificates for debugging

May 12, 2016

This post’s purpose is to store the quick shell script that I created for myself the other day after I forgot the password to the previous certificate. Since these are really throwaway I figured I might as well have a single point of entry to regenerate the whole lot:

    openssl genrsa -des3 -out myssl.key 1024
    openssl req -new -key myssl.key -out myssl.csr
    openssl x509 -req -days 365 -in myssl.csr -signkey myssl.key -out myssl.crt

Put that into makecert.sh file, run chmod +x makecert.sh on it and simply execute it for quick generation of self-signed certificates.