Sample code for 30+ languages & platforms
Xojo Plugin

Get Public Key from Certificate PEM

See more Certificates Examples

Loads a certificate from a PEM file and gets the cert's public key.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim cert As New Chilkat.Cert

success = cert.LoadFromFile("qa_data/certs/someCert.pem")
If (success = False) Then
    System.DebugLog(cert.LastErrorText)
    Return
End If

// Get the certificate's public key:
Dim pubkey As New Chilkat.PublicKey
success = cert.GetPublicKey(pubkey)

System.DebugLog(pubkey.GetPem(False))

// OK.. we have the public key which can be used in other Chilkat classes/methods...