Monday, November 4, 2024

Create certificate with openssl command to install on IIS (windows 2019)

 Create certificate with openssl command to install IIS

#Create csr and praivatekey

openssl genrsa -out faxconkey.key 2048

chmod a-w faxconkey.key

openssl req -out faxconcsr.csr -key faxconkey.key -new -sha256

#copy file .csr and .key to windows server for gen file cert

open browser http://servertest/certsrv/

login: user Administrator domain

passwd:

-> Request certificate

-> Advanced certificate request

-> open file .csr with notepad and copy text file on .csr to generate cer

-> Certificate template : Web Server

-> Submit

-> Download file certificate

-> Convert .cer to .pfx

c:\Program Files\OpenSSL-Win64\bin>openssl pkcs12 -export -in D:\Certificate\test\faxconcer.cer -inkey D:\Certificate\test\faxconKey.key -out D:\Certificate\test\certificate-faxcon.pfx

Enter passwd key:

-> Install file .pfx to IIS server by import



No comments: