无法配置 HTTP.SYS 以允许 SSL 流量 (netsh.exe)

发布于 2024-10-05 22:07:46 字数 470 浏览 0 评论 0原文

我正在运行自托管服务,当我尝试配置 HTTP.SYS 以允许 SSL 流量时:

Netsh http add sslcert 0.0.0.0:8000 
                       ba616b762ba67f30d62a94c59febf34bbf3089a9 
                      {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 )

我收到错误“SSL 证书添加失败,错误:1312。”指定的登录会话不存在。它可能已经被终止了”。有什么想法我做错了吗?

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 
                      {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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情愿 2024-10-12 22:07:46

您确定格式不是

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

Are you sure the format is not

httpcfg set ssl /i 10.0.0.1:80 /h 2c8bfddf59a4a51a2a5b6186c22473108295624d /g "{2bb50d9c-7f6a-4d6f-873d-5aee7fb43290}"
无语# 2024-10-12 22:07:46

当我的证书存储在“受信任的根证书颁发机构”存储中时,我遇到此问题。

解决方法:

  1. 在 CertManager 中,将证书拖到“个人”存储中。
  2. 然后运行命令(httpcfg 或在较新的 Windows 上“NetSh httpadd sslcert ...”)
  3. 然后将证书拖回“受信任的根证书颁发机构”。

此外,当您的证书位于“个人”存储中时,您可以通过选择“更多操作...所有任务...管理私钥”来更改可以使用该证书的用户帐户。您无法在“受信任的根证书颁发机构”商店中获得此菜单。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文