CryptoSys PKI Pro Manual

x509QueryCert

Query an X.509 certificate file for selected information.

Syntax

[VBA]
Public Function x509QueryCert ( _
    szCertFile As String, _
    szQuery As String, _
    Optional nOptions As Long = 0 _
) As String

Parameters

szCertFile
Name of X.509 certificate file (or base64 representation).
szQuery
Query string (case insensitive). Valid queries are:
"version"
"serialNumber"
"signatureAlgorithm"
"sigAlgId"
"signatureValue"
"notBefore"
"notAfter"
"issuerName"
"subjectName"
"subjectPublicKeyAlgorithm"
"subjectKeyIdentifier"
"authorityKeyIdentifier"
"rfc822Name"
"isCA"
"keyUsageString"
"extKeyUsageString"
"cRLDistributionPointsURI"
"authorityInfoAccessURI"
"subjectAltName"
"hashAlgorithm"
"pssParams"
nOptions
Use 0 for default or add any of:
PKI_X509_LATIN1 or PKI_X509_UTF8
PKI_X509_LDAP
PKI_X509_DECIMAL

Return Value

String: String containing the result or an empty string if not found or error.

Remarks

PKI_X509_UTF8 will output attribute string encoded in UTF-8. PKI_X509_LATIN1 will attempt to convert output to Latin-1 encoding.

Example

Debug.Print x509QueryCert("AliceRSASignByCarl.cer", "subjectName")
CN=AliceRSA
[PREV: x509HashIssuerAndSN...]   [Contents]   [Index]   
   [NEXT: x509ReadCertStringFromP7Chain...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.