Generating and using self-signed certificates for local developing

Generating the self-signed certificate Generate a self-signed certificate using the openssl command: openssl req -nodes -new -x509 -keyout localhost.pem -out localhost.pem -days 365 In this case the key and the certificate itself will be in the same ./localhost.pem file. Installing the new certificate using ca-certificates Copy the certificate to /usr/share/ca-certificates/localhost.crt, then set the correct permission. Then use the dpkg-reconfigure to list and enable the certificate. sudo cp ./localhost.pem /usr/share/ca-certificates/localhost.crt sudo chown $USER /usr/share/ca-certificates/localhost....

May 17, 2021 · 2 min · Jonathan