Bind the certificate to the port:
netsh http add sslcert ipport=0.0.0.0:[PORT]
certhash=[CERTHASH] certstorename=Root appid=[APPGUID]
The [CERTHASH] parameter specifies the thumbprint of the
certificate. [APPGUID] is the GUID to identify the owning application. Follow
these steps to retrieve a certificate thumbprint.
-
Open the Microsoft Management Console (MMC) snap-in for
certificates.
-
In the Console Root window's left pane, click
Certificates (Local Computer).
-
Click the
Trusted Root Certification Authorities to
expand it.
-
Click the Certificates folder to expand
it.
-
In the list of certificates, find the certificate you imported
as part of this procedure.
-
Double-click the certificate.
-
In the
Certificate dialog box, click the
Details tab.
-
Scroll through the list of fields and click
Thumbprint.
-
Copy the hexadecimal characters from the box. Remove the
spaces between the hexadecimal numbers. For example, the thumbprint
a9 09 50 2d d8 2a e4 14 33 e6 f8 38 86 b0 0d 42 77 a3 2a
7b should be specified as
a909502dd82ae41433e6f83886b00d4277a32a7b in
code.