Sample code for 30+ languages & platforms
AutoIt

Get Certificate's Public Key

Loads a certificate from PEM and gets the public key.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oCert = ObjCreate("Chilkat.Cert")

Local $strPem = "-----BEGIN CERTIFICATE----- ..."

$bSuccess = $oCert.LoadPem($strPem)
If ($bSuccess = False) Then
    ConsoleWrite($oCert.LastErrorText & @CRLF)
    Exit
EndIf

$oPubKey = ObjCreate("Chilkat.PublicKey")
$oCert.GetPublicKey($oPubKey)

; You can now use the public key object however it is needed,
; and access its various properties and methods..

ConsoleWrite($oPubKey.GetXml() & @CRLF)