Query an X.509 certificate file for selected information.
public static string QueryCert( string certFile, string query, X509.OutputOpts outOpts )
Public Shared Function QueryCert ( _ certFile As String, _ query As String, _ outOpts As X509.OutputOpts _ ) As String
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). |
VB6/C equivalent: X509_QueryCert