Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

New Post: Add Subject Alternate Names to Cert Request

$
0
0
Camelot wrote:
Ok, let's try this approach. Open Submit-CertificateRequest.ps1 file and find the following lines:
foreach ($attrib in $Attribute) {
[Void]$SB.Append($attrib + "\n")
}
and replace "\n" with "`n", so the resulted expression will be:
foreach ($attrib in $Attribute) {
[Void]$SB.Append($attrib + "`n")
}
and let me know if it works. I smell a bug here.
I feel we come closer to the solution. I adapted the line according your instruction and noticed that additionally the line

$strAttribute = $strAttribute.Substring(0,$strAttribute.Length - 2)

has to be replaced by

$strAttribute = $strAttribute.Substring(0,$strAttribute.Length - 1) otherwise the last character from the domain name was cut away.

We now can submit the san attribute with the request and we see the value in the downloaded Request-Object BUT the SANS do not appear in the final certificate.
Could it be the case that we have to use another name than "san" in the -attribute Parameter for it e.g. "SubjectAlternateNames:....."?

Viewing all articles
Browse latest Browse all 729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>