OpenSSL

Подписываем сертификат на несколько доменов

Создаем корневой ключ:

openssl genrsa -out rootCA.key 2048

Самоподписаный корневой сертификат:

openssl req -x509 -new -key rootCA.key -days 10000 -out rootCA.crt

Ключ для сервера:

openssl genrsa -out example.com.key 2048

Создаем конфиг openssl.cnf:

[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = MN

Fast create seft-signed certificate with openssl

openssl req -new -x509 -days 365 -nodes -out SSL_CERT.crt -keyout SSL_KEY.key

       The req command primarily creates and processes certificate requests in PKCS#10 format. It can additionally create self signed
       certificates for use as root CAs for example.
 
       -new
           this option generates a new certificate request. It will prompt the user for the relevant field values. The actual fields
           prompted for and their maximum and minimum sizes are specified in the configuration file and any requested extensions.
 
       -x509