In computer security, a self-signed certificate is an identity certificate which is signed by the same entity whose identity it certifies. Of course, a certificate like this doesn’t have a lot of security value, but it is a convenient way to test things without without spending money.
Creating a self-signed certificate varies from operating system to another. In this post I will demonstrate how to create a self-signed certificate on MAC OS.
You will need open SSL which comes preinstalled on MAC OS. To be sure you are using the latest version, open a terminal window and type the following command:
1 |
brew upgrade openssl |
You may check you openssl version issuing the next command:
1 |
openssl version |
Within the terminal window, navigate to the directory where you want to create the certificate store, and issue the following commands:
1 2 3 |
openssl genrsa -out key.pem openssl req -new -key key.pem -out cert.pem openssl req -x509 -days 365 -key key.pem -in cert.pem -out certificate.pem |
Security Note: Once you have the certificate files, place them somewhere in your filesystem that is not within one of the the accessible application’s directories.