Merge
This commit is contained in:
commit
a151361daa
1 changed files with 6 additions and 3 deletions
|
@ -281,12 +281,15 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
|
|
||||||
if (!dedicatedIp)
|
if (!dedicatedIp)
|
||||||
{
|
{
|
||||||
hostNames.AddRange(from extension in certificate.Extensions.Cast<X509Extension>() where extension.Oid.FriendlyName == "Subject Alternative Name" select extension.Format(true));
|
hostNames.AddRange(certificate.Extensions.Cast<X509Extension>()
|
||||||
|
.Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names
|
||||||
|
.SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Split('=')[1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hostNames.Any())
|
var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false);
|
||||||
|
if (hostNames.All(h => h != simpleName))
|
||||||
{
|
{
|
||||||
hostNames.Add(certificate.GetNameInfo(X509NameType.SimpleName, false));
|
hostNames.Add(simpleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For every hostname (only one if using old school dedicated IP binding)
|
// For every hostname (only one if using old school dedicated IP binding)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue