SSL/HTTPS

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

SSL/HTTPS

To enable HTTPS protocol perform the following steps.

 

1. Obtain SSL certificate (f.e. from https://letsencrypt.org)

2. Convert certificate to .pfx format (there are online tools for this).

3. Import certificate as described in https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-view-certificates-with-the-mmc-snap-in?redirectedfrom=MSDN

or using the following powershell command

  $certpwd = ConvertTo-SecureString -String "123456" -Force –AsPlainText
  Import-PfxCertificate –FilePath C:\temp\mycert.pfx cert:\localMachine\my -Password $certpwd

 

4. Run Powershell in Administrator mode and execute

 

dir cert:\localmachine\my

 

5. Copy certificate hash from output and execute

 

$guid = [guid]::NewGuid()
$certHash = "<certificate hash>"
$ip = "0.0.0.0" # This means all IP addresses
$port = "443" # the default HTTPS port
"http add sslcert ipport=$($ip):$port certhash=$certHash appid={$guid}" | netsh

 

6. For TWebUIServer set (before start)

 

 UseSSL := true;
 Port := 443;