在 Windows Server 2022 上使用“netsh http add sslcert”时出现“参数不正确”错误

问题描述 投票:0回答:1

我收到“参数不正确”的消息。 Windows Server 2022 上出现错误

我从

certutil -store "MY" %SSL_DOMAIN% ^| find "Key Container"

获取appid

证书哈希(sha1):6d5b92e25d056dc1c6dc671672e0dd2363ea1aac 密钥容器 = !002a.fz-win.tk-2a270cf2-6652-4e79-81ce-36087def3cc2 提供商 = Microsoft 软件密钥存储提供商

然后使用这个“Key Container”值来设置appid参数

netsh http add sslcert hostnameport=xxxxxx:443 certstorename=MY certhash=6d5b92e25d056dc1c6dc671672e0dd2363ea1aac appid=!002a.fz-win.tk-f2ee0730-9396-4a0a-8fdb-d62e126a753a

appid 格式错误,我认为问题在于 certutil 上的提供程序。

这些命令用于将 SSL 证书关联到绑定。 这些命令在旧版 Windows 服务器中工作正常。 请你帮助我。

这些命令是将 SSL 证书关联到绑定。

ssl iis netsh certutil windows-server-2022
1个回答
0
投票

[appid=GUID] 指定 GUID 以标识所属应用程序。

  1. 您需要指定一个“appId”,它是 Windows 将用来识别证书的全局唯一标识符 (GUID) 或通用唯一标识符 (UUID)。
  2. 如果您有 Visual Studio,您可以使用工具 -> 创建 GUID -> 选择“4.注册表格式”。
  3. 有一个“免费”在线 GUID 生成器 https://guidgenerator.com/online-guid-generator.aspx.
  4. 或者创建您自己的:https://en.wikipedia.org/wiki/Universally_unique_identifier

命令如下所示,仅作为示例:

netsh http add sslcert hostnameport=xxxxxx:443 certstorename=MY certhash=6d5b92e25d056dc1c6dc671672e0dd2363ea1aac appid={00112233-4455-6677-8899-AABBCCDDEEFF}

相关参考链接:

https://learn.microsoft.com/en-us/windows/win32/http/add-sslcert

https://superuser.com/questions/1094209/appid-or-guid-of-a-running-service

netsh.exe 应该使用什么“appid”?

© www.soinside.com 2019 - 2024. All rights reserved.