1,生成加密证书
用VisualStudio 中 MakeCert.exe 的工具生成加密证书。
MakeCert.exe -sr localmachine -ss My -n CN=localhost,OU=https://localhost -sky exchange -pe -r localhost.cer
2,查看生成好的加密证书的『Thumbprint hash』
3,用 httpcfg 命令将加密证书和SSL端口关联好。
关联 httpcfg set ssl -i [ip]:[port] -h [thumbprint hash]
解除关联 httpcfg delete ssl –i [ip]:[port]
C:\Documents and Settings\Administrator>httpcfg query ssl C:\Documents and Settings\Administrator>httpcfg set ssl -i 0.0.0.0:10180 -h 59ab8e12f1dbf43060684932c1bb570874049c09 HttpSetServiceConfiguration completed with 0. C:\Documents and Settings\Administrator>httpcfg query ssl IP : 0.0.0.0:10180 Hash : 59ab8e12f1dbf