Visual FoxPro
Visual FoxPro
Get Issuer Certificate Information
See more Certificates Examples
A certificate contains information about its issuer. This example demonstrates how to get the issuer information from a certificate.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loCert
lnSuccess = 0
loCert = CreateObject('Chilkat.Cert')
lnSuccess = loCert.LoadFromFile("qa_data/certs/sample.cer")
IF (lnSuccess = 0) THEN
? loCert.LastErrorText
RELEASE loCert
CANCEL
ENDIF
* Get issuer information:
* -----------------------------------------------------------------------
* (Not all subject fields may exist depending on the issuer certificate.)
* -----------------------------------------------------------------------
* Issuer DN (Distinguished Name, i.e. all the Issuer subject parts)
? "DN: " + loCert.IssuerDN
* Common Subject parts:
* Issuer Common Name
? "CN: " + loCert.IssuerCN
* Issuer Country
? "C: " + loCert.IssuerC
* Issuer Email address
? "E: " + loCert.IssuerE
* Issuer Locality
? "L: " + loCert.IssuerL
* Issuer Organization
? "O: " + loCert.IssuerO
* Issuer Organizational Unit
? "OU: " + loCert.IssuerOU
* Issuer State
? "S: " + loCert.IssuerS
RELEASE loCert