Often times, you’ll find yourself in need of creating a self signed certificate for a lot of programs. I had to create a cert for a web site for personal purposes, so I decided to write down the process.
First, you’ll need to install OpenSSL. In FreeBSD, you can do the following: [/code]
cd /usr/ports/security/openssl/ && make install clean
Now we need to create a private key (and I hate to enter a password every time the key is used, so we’ll do it without the password):
openssl genrsa -out domainname.key 2048
Next we need to create a CSR request based off of the Private Key (do not add the additional options, like challenge password):
openssl req -new -key domainname.key -out domainname.csr
Now we can generate a self signed certificate based off of the request:
openssl x509 -req -days 365 -in domainname.csr -signkey domainname.key -out domainname.crt
And there you have it!