Reputation: 790
I'm trying to execute this command in CMD:
netsh http add sslcert ipport=0.0.0.0:443 certhash=89857a42309423c239f42392384a appid={214124cd-d05b-4309-9af9-13123454a52b}
and got error message:
SSL Certificate add failed, Error: 183 Cannot create a file when that file already exists.
How to add certificate to ipport if the certificate has already been added?
Upvotes: 18
Views: 34061
Reputation: 1
We managed to resolve this issue by removing it from registers. The netsh commands provided never worked but manually deleting the old certificate bindings from registers from this location worked:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\SslBindingInfo
Then just restart the machine and netsh certificate listing will show the list without deleted certificates.
Upvotes: 0
Reputation: 790
It means that the port has already bounded a certificate. If we want to bound new certificate we need to delete the old one and bound new one.
Check if port has bounded a cert:
netsh http show sslcert > c:\result.txt
Open the result.txt and search for the port (in my case 443)
Delete the old certificate:
netsh http delete sslcert ipport=0.0.0.0:443
Bound new certificate
netsh http add sslcert ipport=0.0.0.0:443 certhash=89857a42309423c239f42392384a appid={214124cd-d05b-4309-9af9-13123454a52b}
Upvotes: 34