Prerequisites
Install OpenSSL link below
Download OpenSSL
- Open Command Prompt or PowerShell
Open it as an Administrator to ensure you have the necessary permissions. - Navigate to the OpenSSL Directory
(default: cd "C:\Program Files\OpenSSL-Win64\bin") - Generate the Private Key
openssl genrsa -out myprivatekey.key 2048
openssl req -new -key myprivatekey.key -out myrequest.csr
Follow the prompts to enter your information, such as country, state, and Common Name (your domain or IP).- Generate the Self-Signed Certificate
openssl x509 -req -days 365 -in myrequest.csr -signkey myprivatekey.key -out mycertificate.crt
Note: -days 365
specifies the certificate's validity period (1 year). - Verify
Your self-signed certificate (mycertificate
.crt
) and private key (myprivatekey.key
) are now created in the current directory.