I am using the following netsh command successfully:
netsh http add sslcert ipport=127.0.0.1:9000 appid={7B8DB713-2C51-41B5-AE6F-6DAA07833DBE} certhash=69fed34fdf164e7feac5e17823b94d0f30ab05c5but when I change the "ipport=..." to "hostnameport" it doesn't work:
netsh http add sslcert hostnameport=localhost:9000 appid={7B8DB713-2C51-41B5-AE6F-6DAA07833DBE} certhash=69fed34fdf164e7feac5e17823b94d0f30ab05c5I get the following error: SSL Certificate add failed, Error: 87 The parameter is incorrect.
This is the ONLY THING I've changed in the command. I am still running as administrator, same exact command prompt. Why am I getting this error?
1 Answer
The problem is a bug in the netsh command. When using "hostnameport" you must also add the "certstorename=MY" parameter. This is the default value for certstorename, and it is explicitly documented as optional. So my new command is:
netsh http add sslcert hostnameport=localhost:9000 appid={7B8DB713-2C51-41B5-AE6F-6DAA07833DBE} certhash=69fed34fdf164e7feac5e17823b94d0f30ab05c5 certstorename=MY