开发者

Can't configure HTTP.SYS to allow SSL traffic (netsh.exe)

I’m running self-hosting service and when I try to configure HTTP.SYS to allow SSL traffic:

Netsh http add sslcert 0.0.0.0:8000 
                       ba616b762ba67f30d62a94c59febf34bbf3089a9 
   开发者_StackOverflow社区                   {4dc3e181-e14b-4a21-b022-59fc669b0914}

where 'ba...' string is thumbprint of a installed certificate 
and '{4dc3e…}' is just some random number ( which I assume will be used
as an application identifier )

I get error “SSL Certificate add failed, Error:1312. A specified logon session does not exist. It may already have been terminated” . Any ideas what I am doing wrong?


Are you sure the format is not

httpcfg set ssl /i 10.0.0.1:80 /h 2c8bfddf59a4a51a2a5b6186c22473108295624d /g "{2bb50d9c-7f6a-4d6f-873d-5aee7fb43290}"


I have this problem when my cert is stored in the "Trusted Root Certification Authorities" store .

To workaround:

  1. In CertManager, Drag the cert into "Personal" store.
  2. Then run your command (httpcfg or "NetSh httpadd sslcert ..." on newer windows)
  3. Then drag the cert back to "Trusted Root Certification Authorities".

Also when, your cert is the in the "Personal" store, you change which user accounts can use the cert by choosing: "More Actions...All Tasks...Manage Private Keys". You don't get this menu in the "Trusted Root Certificaotin Authorities" store.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜