How to generate crt and key openssl

In this article let’s discuss about How to generate crt and key openssl. Let’s go through the following methods without any delay.

Method 1:

openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
  -keyout example.key -out example.crt -subj "/CN=example.com" \
  -addext "subjectAltName=DNS:example.com,DNS:www.example.net,IP:10.0.0.1"

Hope the above solution works.

Realted Posts : How to run shell script in docker build