1. Home
  2. Docs
  3. Others
  4. Creating a self-signed certificate with Subject Alternative Name

Creating a self-signed certificate with Subject Alternative Name

Create a file with the name domain.cnf and add the following configuration as per your requirement:

[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn
[dn]
C = ES
ST = MyState
L = MyCity
O = MyOrg
emailAddress = email@mydomain.com (Any email address)
CN = sss-laptop136.aaspl-brd.com (CR FQDN Url Name)
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = sss-laptop136.aaspl-brd.com (CR FQDN Url Name)
DNS.2 = sss-laptop151.aaspl-brd.com (IQBOT URL FQDN Name)

  1. Download the Openssl utility.
  2. Create the certificate either on Microsoft Windows or on Linux:

Run the following command to create the certificate on Microsoft Windows:

openssl.exe req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout "D:\ssc\ssc\key.key" -days 3560 -out "D:\ssc\ssc\cert.crt" -config "D:\ssc\ssc\domain.cnf"

Run the following command to create the certificate on Linux:

openssl req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout /tmp/cert/key.key -days 3560 -out /tmp/cert/cert.crt -config /tmp/cert/domain.cnf
  1. Create the .pfx file from cert and key file:

Run the following command to create the .pfx file from the cert and key file on Microsoft Windows:

openssl.exe pkcs12 -export -out "D:\ssc\ssc\sss-aspl.pfx" -inkey "D:\ssc\ssc\key.key" -in "D:\ssc\ssc\cert.crt"

Run the following command to create the .pfx file from the cert and key file on Linux:

openssl pkcs12 -export -out /tmp/cert/sss-aspl.pfx -inkey /tmp/cert/key.key -in /tmp/cert/cert.crt"
  1. Import the .pfx file in Microsoft IIS.Use the same .pfx file with the installation of IQ Bot.
openssl.exe req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout "D:\ssc\ssc\key.key" -days 3560 -out "D:\ssc\ssc\cert.crt" -config "D:\ssc\ssc\domain.cnf"