Visual FoxPro
Visual FoxPro
Get Certificate's Public Key
Loads a certificate from PEM and gets the public key.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loCert
LOCAL lcStrPem
LOCAL loPubKey
lnSuccess = 0
loCert = CreateObject('Chilkat.Cert')
lcStrPem = "-----BEGIN CERTIFICATE----- ..."
lnSuccess = loCert.LoadPem(lcStrPem)
IF (lnSuccess = 0) THEN
? loCert.LastErrorText
RELEASE loCert
CANCEL
ENDIF
loPubKey = CreateObject('Chilkat.PublicKey')
loCert.GetPublicKey(loPubKey)
* You can now use the public key object however it is needed,
* and access its various properties and methods..
? loPubKey.GetXml()
RELEASE loCert
RELEASE loPubKey