Using HTTPS
| Line 68: | Line 68: | ||
* convert cert.my+4.cer and cert.my+4.key files to cert.my+4.pfx | * convert cert.my+4.cer and cert.my+4.key files to cert.my+4.pfx | ||
| − | <b>certutil -MergePFX cert.my+4.cer cert.my+4.pfx< | + | <b>certutil -MergePFX cert.my+4.cer cert.my+4.pfx</b><br> |
<i>> Signature test passed<br> | <i>> Signature test passed<br> | ||
> Enter new password for output file cert.my+4.pfx:<br> | > Enter new password for output file cert.my+4.pfx:<br> | ||
> Enter new password:</i><br> | > Enter new password:</i><br> | ||
<b>******<Enter></b><br> | <b>******<Enter></b><br> | ||
| − | <i>> Confirm new password:< | + | <i>> Confirm new password:</i><br> |
<b>******<Enter></b><br> | <b>******<Enter></b><br> | ||
<i>> CertUtil: -MergePFX command completed successfully.</i><br> | <i>> CertUtil: -MergePFX command completed successfully.</i><br> | ||
Revision as of 16:53, 28 July 2026
This page is a copy of the original page on the AVObjects' web site and can also be viewed here.
Steps required to use the HTTPS protocol.
Before you can start using the HTTPS protocol to communicate with a WRTP server, you need to create, install, and bind certificates.
Creating certificates
To create 2 debug certificates for testing the HTTPS protocol, you need to do the following:
1). Installing mkcert.exe
- open https://github.com/FiloSottile/mkcert/releases
- download the mkcert-v1.4.4-windows-amd64.exe file to the "C:\Program Files\mkcert" folder (create this folder) and rename it to mkcert.exe.
- add "C:\Program Files\mkcert" to PATH (system variables):
Settings -> System -> About -> Advanced system settings -> Enviroment variables -> System variables\Path: press "Edit..." -> Press "New" -> put "C:\Program Files\mkcert" -> press OK -> press OK -> press OK -> Close Settings.About
2). Creating CA certificate (<user name> is name of curent user).
- remove old CA certificate from "C:\Users\<user name>\AppData\Local\mkcert" folder
- open Windows console (command prompt or Windows terminal) with administrator rights
- in the console window (header "Administrator: Command") enter:
mkcert -install
> Created a new local CA
In "Security Warning" Dialog : press Yes
> The local CA is now installed in the system trust store!
- The files "rootCA.pem" and "rootCA-key.pem" should have been created in the "C:\Users\<user name>\AppData\Local\mkcert" folder. Move them to some folder where you will store your certificates.
3). Creating work certificate cert.my for 4 names.
NOTE. IP address 192.168.1.999 is used as server IP address, please change it to your real IP address.
- in the console window (header "Administrator: Command") enter
mkcert cert.my localhost 127.0.0.1 ::1 192.168.1.999
> Created a new certificate valid for the following names
> - "cert.my"
> - "localhost"
> - "127.0.0.1"
> - "::1"
> - "192.168.1.999"
> The certificate is at "./cert.my+4.pem" and the key at "./cert.my+4-key.pem"
- The files "cert.my+4.pem" and "cert.my+4-key.pem" should have been created in the "C:\Windows\System32" folder. Move them to some folder where you will store your certificates.
4). Convert .pem files to .pfx files using the certutil tool.
- rename your .pem files:
rootCA.pem -> rootCA.cer
rootCA-key.pem -> rootCA.key
cert.my+4.pem -> cert.my+4.cer
cert.my+4-key.pem -> cert.my+4.key
- In the console window (header "Administrator: Command"), go to the folder containing the certificates:
cd <folder with certificates>
- convert rootCA.cer and rootCA.key files to rootCA.pfx
certutil -MergePFX rootCA.cer rootCA.pfx
> Signature test passed
> Enter new password for output file rootCA.pfx:
> Enter new password:
******<Enter>
> Confirm new password:
******<Enter>
> CertUtil: -MergePFX command completed successfully.
The file "rootCA.pfx" should have been created in the <folder with certificates>.
- convert cert.my+4.cer and cert.my+4.key files to cert.my+4.pfx
certutil -MergePFX cert.my+4.cer cert.my+4.pfx
> Signature test passed
> Enter new password for output file cert.my+4.pfx:
> Enter new password:
******<Enter>
> Confirm new password:
******<Enter>
> CertUtil: -MergePFX command completed successfully.
The file "cert.my+4.pfx" should have been created in the <folder with certificates>.