是否可以在IIS中创建自签名的SAN证书?如果是这样的话,我该如何创建它?在IIS中,我只看到创建普通ssl证书的选项:
发布于 2018-01-15 08:02:25
不幸的是,IIS管理器无法创建带有SAN扩展的证书或请求。你得用点别的东西。例如,PowerShell或certreq.exe工具(都包含在方框中)。
New-SelfsignedCertificate `
-DnsName "mysite.com","www.mysite.com" `
-CertStoreLocation cert:\localmachine\my
New-SelfsignedCertificate -Subject "CN=www.mysite.com" `
-DnsName "mysite.com","www.mysite.com" `
-EKU "Server Authentication" `
-KeySpec "KeyExchange" `
-KeyUsage "DigitalSignature", "KeyEncipherment" `
-FriendlyName "My web site"
-NotAfter $([datetime]::now.AddYears(1)) `
-CertStoreLocation cert:\localmachine\my
准备具有以下内容的INF模板文件(具有.inf文件扩展名):
[NewRequest]
Subject = "CN=www.mysite.com"
KeyLength = 2048
KeyAlgorithm = RSA
ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider"
MachineKeySet = true
KeySpec = 1
KeyUsage = 0xa0
RequestType = Cert
[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1 ; server authentication
[Extensions]
2.5.29.17 = "{text}"
_continue_ = "dns=mysite.com&"
_continue_ = "dns=www.mysite.com"
然后对此INF文件执行以下命令:
certreq -new path\myinftemplate.inf
发布于 2018-01-15 07:34:51
什么版本的Windows?如果它是较新版本的Windows,那么只打开powershell并使用新-自签署证书命令就更容易了。您可以使用-DnsName
提供SAN中您想要的所有名称的列表。
https://serverfault.com/questions/892193
复制相似问题