Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Windows: Step 4: update code to ensure outputted files are in ASCII VS UCS-2 on some versions of Windows

...

Code Block
languagebash
themeRDark
$allcerts = Get-Content "$env:UserProfile\Downloads\host.domain.tld_full-chain.pem" -Encoding UTF8 -Raw
$i = 0
[regex]::Matches($allcerts, '(-{5}BEGIN CERTIFICATE-{5}[\s\S]*?-{5}END CERTIFICATE-{5})') | ForEach-Object {
    $i++
    $_.value | Out-file "$env:UserProfile\Downloads\host.domain.tld_part-$i.pem" -encoding ASCII
}

5. Use Java keytool to inspect each cert you split; where host.domain.tld = the FQDN of the server you connected to and n = a...z.  The certificates should be ordered from most specific (ie: the server cert) to the issuing root CA's (self-signed) certificate:  

...