CryptoSys PKI Pro Manual

X509.QueryCert Method

Query an X.509 certificate file for selected information.

Syntax

[C#]
public static string QueryCert(
	string certFile,
	string query,
	X509.OutputOpts outOpts
)
[VB.NET]
Public Shared Function QueryCert ( _
	certFile As String, _
	query As String, _
	outOpts As X509.OutputOpts _
) As String

Parameters

certFile
Filename of certificate file (or its base64 representation)
query
Query string (case insensitive)
outOpts
Type: X509.OutputOpts
Optional options for output (default = 0)

Return Value

String containing the result, or an empty string if query not found or on error.

Remarks

Both binary BER and PEM-format certificates can be read, as can a base64 representation of the certificate.

Valid queries are:

"version"X.509 version number, e.g. "3".
"serialNumber"Serial number in hex-encoded format.
"signatureAlgorithm"Signature algorithm used, e.g. "sha1WithRSAEncryption".
"signatureValue"Signature value in hex-encoded format.
"notBefore"Date on which the certificate validity period begins in ISO format yyyy-mm-ddThh:nn:ssZ
"notAfter"Date on which the certificate validity period ends in ISO format yyyy-mm-ddThh:nn:ssZ
"issuerName"Distinguished name (DN) of entity who has signed and issued the certificate.
"subjectName"Distinguished name (DN) of the subject.
"subjectPublicKeyAlgorithm"Algorithm used in subject's public key, e.g. "dsa".
"subjectKeyIdentifier"The subject key identifier extension, if present, in hex-encoded format.
"authorityKeyIdentifier"The authority key identifier extension, if present, in hex-encoded format.
"rfc822Name"Internet mail address contained in a subjectAltName extension, if present.
"isCA"Returns "1" if the subject type is a CA, otherwise returns "0".
"keyUsageString"keyUsage flags in text format, e.g. "digitalSignature,nonRepudiation".
"extKeyUsageString"extKeyUsage purposes in text format, e.g. "codeSigning,timeStamping".
"cRLDistributionPointsURI"First URI found in cRLDistributionPoints, if any.
"authorityInfoAccessURI"First URI found in authorityInfoAccess, if any.
"subjectAltName"Subject alternative name extension, if present.
"hashAlgorithm"Hash algorithm used in signature, e.g. "sha256".
"pssParams"Parameters used for RSA-PSS (if applicable).

See Also

VB6/C equivalent: X509_QueryCert

[Contents] [Index]

[PREV: X509.MakeCRL Method...]   [Contents]   [Index]   
   [NEXT: X509.ReadCertStringFromP7Chain Method...]

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