Creating Self Signed certificate is very essential when you are practicing SSL implementation OR doing some POC and you need to test the environment with SSL certificate. In such cases, a self signed certificate is a quick solution and go-to route for most of the cases. Of course, you must use self signed certificates for testing and internal environment and not for Production or Critical environments where security can not be compromised.
Having said that, let's see how we can create a self signed certificate. The method that I am showing in this article is using OpenSSL.
Create Self Signed Certificate using OpenSSL:
1) Install OpenSSL using YUM. On Windows, you can download it from here.
yum install openssl
2) Generate a Private Key for your certificate using below command.
openssl genrsa -out demo.com.key 2048
3) Create a Certificate Signing Request (CSR) file using below command.
openssl req -new -key demo.com.key -out demo.com.csr
4) Finally generate the Self-Signed SSL Certificate using below command.
openssl x509 -req -days 3650 -in demo.com.csr -signkey demo.com.key -out demo.com.crt
You self signed certificate is created. Check your present working directory (pwd) for .key .csr and .crt files.
I hope this helps !!
No comments:
Post a Comment