(Visual FoxPro) Load DER encoded X.509 Certificate (.cer, .crt)
Loads a digital certificate from a binary DER encoded X.509 Certificate (.cer, .crt) and fetches information about the cert.
LOCAL loCert
LOCAL lnSuccess
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Cert')
loCert = CreateObject('Chilkat.Cert')
* LoadFromFile will load virtually any certificate format file.
* It will auto-recognize the format and load appropiately.
lnSuccess = loCert.LoadFromFile("/Users/chilkat/testData/cer/chilkat_ssl.cer")
IF (lnSuccess <> 1) THEN
? loCert.LastErrorText
RELEASE loCert
CANCEL
ENDIF
* DN = "Distinguished Name"
? "SubjectDN:" + loCert.SubjectDN
? "Common Name:" + loCert.SubjectCN
? "Issuer Common Name:" + loCert.IssuerCN
? "Serial Number:" + loCert.SerialNumber
RELEASE loCert
|