B4X Requires Chilkat v11.0.0+
B4X
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 B4X Downloads
Dim success As Boolean = False
Dim cert As ChilkatCert
cert.Initialize("cert")
success = cert.LoadFromFile("qa_data/pem/my_cert.pem")
If success = False Then
Log(cert.LastErrorText)
Return
End If
Dim pubkey As ChilkatPublicKey
pubkey.Initialize
cert.GetPublicKey(pubkey)
' Examine the public key as XML..
Log(pubkey.GetXml)