cmd - SSL 证书添加失败,错误 : 183 Cannot create a file when that file already exists - How to bound certificate to ipport?

标签 cmd https certificate ssl-certificate netsh

我正在尝试在 CMD 中执行此命令:

netsh http add sslcert ipport=0.0.0.0:443 certhash=‎89857a42309423c239f42392384a appid={214124cd-d05b-4309-9af9-13123454a52b}
并收到错误消息:

SSL Certificate add failed, Error: 183 Cannot create a file when that file already exists.


如果已添加证书,如何将证书添加到 iport?

最佳答案

这意味着该端口已经绑定(bind)了一个证书。如果我们要绑定(bind)新证书,我们需要删除旧证书并绑定(bind)新证书。

  • 检查端口是否绑定(bind)了证书:netsh http show sslcert > c:\result.txt
  • 打开 result.txt 并搜索端口(在我的例子中是 443)
  • 删除旧证书:netsh http delete sslcert ipport=0.0.0.0:443
  • 绑定(bind)新证书netsh http add sslcert ipport=0.0.0.0:443 certhash=‎89857a42309423c239f42392384a appid={214124cd-d05b-4309-9af9-13123454a52b}
  • 关于cmd - SSL 证书添加失败,错误 : 183 Cannot create a file when that file already exists - How to bound certificate to ipport?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57833235/

    相关文章:

    windows - 如何从 CMD.exe 切换到 Powershell?

    windows - 使用 MakeCab.exe & .ddf 文件(即使用指令文件)如何指定 objective-c ab 文件名?

    android - 如何使用命令行(CMD)冷启动模拟器

    c# - 在 C# 中使用 https 的 HttpWebRequest

    ssl - 由于使用带有 BrowserMob 代理的 Selenium Webdriver 捕获 har 文件的 SSL 证书,无法加载资源

    java - 将数据发送到服务器时 Android 中的 ASN.1Exception

    azure - 如何作为 Azure 数据工厂的一部分解压缩并执行批处理服务作业

    Tomcat:不获取没有端口号的 SSL 证书

    wcf - 如何设置 WCF 安全以要求客户端证书?

    c# - 如何在没有密码的情况下将证书安装到个人商店?