Go
Go
Get Certificate Public Key from PEM
See more Certificates Examples
Demonstrates how to load a PEM file containing a certificate and access the public key.Chilkat Go Downloads
success := false
cert := chilkat.NewCert()
success = cert.LoadFromFile("qa_data/pem/my_cert.pem")
if success == false {
fmt.Println(cert.LastErrorText())
cert.DisposeCert()
return
}
pubkey := chilkat.NewPublicKey()
cert.GetPublicKey(pubkey)
// Examine the public key as XML..
fmt.Println(*pubkey.GetXml())
cert.DisposeCert()
pubkey.DisposePublicKey()