Eintrag

fetch cert with powershell

1
2
3
4
5
$webRequest = [Net.WebRequest]::Create("https://fetch.com/")
try { $webRequest.GetResponse() } catch {}
$cert = $webRequest.ServicePoint.Certificate
$bytes = $cert.Export([Security.Cryptography.X509Certificates.X509ContentType]::Cert)
set-content -value $bytes -encoding byte -path "$pwd\fetch.cer"
Dieser Eintrag ist vom Autor unter CC BY 4.0 lizensiert.