Install OpenSSL to generate private-key & server certificates request files.
For installing OpenSSL in windows.
https://tecadmin.net/install-openssl-on-windows
After completing the installation,
- Open Terminal/Command prompt window
- Create a private key using
openssl genrsa -out privkey.pem 2048
- Create a certificate signing request (CSR) using your private key and is later transformed into a certificate
openssl req -new -key privkey.pem -out server.csr
- After you run the command, it asked you to provide information that helps to identify your certificate.
- Country Name : Use the two-letter code without punctuation for country. For example: US or CA.
- State or Province Name : Spell out the state completely; do not abbreviate the state or province name. For example: California
- Locality or City Name : The Locality field is the city or town name. For example: Berkeley. Do not abbreviate. For example: Saint Louis, not St. Louis.
- Organization Name : If the company or department has an &, @, or any other symbol using the shift key in its name, the symbol must be spelled out or omitted, in order to enroll.
- Organizational Unit Name : The Organizational Unit(OU) field is the name of the department or organization unit making the request. To skip the OU field, press Enter on the keyboard.
- Common Name : The Common Name is the Host + Domain Name. It is fully qualified name for the system that uses the certificate. If you are using Dynamic DNS, your CN should have a wild-card.
- Now private key pair has now been created.
- Moved the private key and CSR file to a centralize directory.
- Upload the CSR to the valid SSL certificate provider, like rabidssl, hostgator
- After validation, they will send server certificate file & intermediate certificate file. (Name that certificate file as “outputdesk.cer” and Intermediate certificate file as “intermediate.crt“)
- Copy the 2 files from Certificate provider & privkey.pem (generated by us)to SSL dir. To create SSL dir, please open “{Output Desk package installed folder}\public” & create a folder named “ssl”. Now, copy & paste the three files into the ssl folder that we created now. Please make sure that extensions are right in your end.
- Finally, configure those files(“privkey.pem”,”outputdesk.cer”, “intermediate.crt”) in client.js file(File Path:{Output Desk package installed folder}\public\config) as mentioned below:
// SSL config for HTTPS (Full Path)
global.privateKey = “{Output Desk package installed folder}\public\ssl\privkey.pem”;
global.certificate = “{Output Desk package installed folder}\public\ssl\outputdesk.cer”;
global.intermediate1 =“{Output Desk package installed folder}\public\ssl\intermediate.crt”; - Set your https port in global.httpsPort