Skip to content

Instantly share code, notes, and snippets.

@sewhyte
sewhyte / get_root_ca_chain.ps1
Created September 6, 2023 13:05
Get Cert Chain
$url = "https://api.gremlin.com/v1/health"
$WebRequest = [Net.WebRequest]::CreateHttp($url)
$WebRequest.AllowAutoRedirect = $true
$chain = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Chain
#Request website
$Response = $WebRequest.GetResponse()
#Creates Certificate
$Certificate = $WebRequest.ServicePoint.Certificate.Handle
@sewhyte
sewhyte / export_root_ca_pem.ps1
Last active September 6, 2023 13:24
PS Export Gremlin PEM Cert
$url = "https://api.gremlin.com/v1/health"
$WebRequest = [Net.WebRequest]::CreateHttp($url)
$WebRequest.AllowAutoRedirect = $true
$chain = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Chain
#Request website
$Response = $WebRequest.GetResponse()
#Creates Certificate
$Certificate = $WebRequest.ServicePoint.Certificate.Handle
### Keybase proof
I hereby claim:
* I am sewhyte on github.
* I am samew (https://keybase.io/samew) on keybase.
* I have a public key ASCZGZuO4PHmXhPtT3aR6dTCIpWAd_4UC0GigpmKmwCGGgo
To claim this, I am signing this object: