VB.NET
VB.NET
Get Certificate's Public Key
Loads a certificate from PEM and gets the public key.Chilkat VB.NET Downloads
Dim success As Boolean = False
Dim cert As New Chilkat.Cert
Dim strPem As String = "-----BEGIN CERTIFICATE----- ..."
success = cert.LoadPem(strPem)
If (success = False) Then
Debug.WriteLine(cert.LastErrorText)
Exit Sub
End If
Dim pubKey As New Chilkat.PublicKey
cert.GetPublicKey(pubKey)
' You can now use the public key object however it is needed,
' and access its various properties and methods..
Debug.WriteLine(pubKey.GetXml())