...
Code Block | ||||
---|---|---|---|---|
| ||||
$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:
...