Lianja
Lianja
Get Certificate's Public Key
Loads a certificate from PEM and gets the public key.Chilkat Lianja Downloads
llSuccess = .F.
loCert = createobject("CkCert")
lcStrPem = "-----BEGIN CERTIFICATE----- ..."
llSuccess = loCert.LoadPem(lcStrPem)
if (llSuccess = .F.) then
? loCert.LastErrorText
release loCert
return
endif
loPubKey = createobject("CkPublicKey")
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