Sample code for 30+ languages & platforms
Lianja

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 Lianja Downloads

Lianja
llSuccess = .F.

loCert = createobject("CkCert")

llSuccess = loCert.LoadFromFile("qa_data/certs/sample.cer")
if (llSuccess = .F.) then
    ? loCert.LastErrorText
    release loCert
    return
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