Query a CMS signed-data object for selected information.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string QuerySigData(
string inputFile,
string query
)
Public Shared Function QuerySigData (
inputFile As String,
query As String
) As String
Parameters
- inputFile String
- file containing CMS signed-data object
- query String
- Query string (case insensitive)
Return Value
StringString containing the result or an empty string if not found or error.
RemarksValid queries are:
"version" | signedData version (sdVer) value, e.g. "1". |
"eContentType" | ContentType of the EncapsulatedContentInfo, e.g. "data". |
"HASeContent" | "1" if eContent is present; "0" if not. |
"CountOfCertificates" | Number of certificates included in the data. |
"CountOfSignerInfos" | Number of SignerInfos included in the data. |
"signerInfoVersion" | signerInfo version (siVer) value. |
"digestAlgorithm" | digestAlgorithm, e.g. "sha1". |
"signatureAlgorithm" | signatureAlgorithm, e.g. "rsaEncryption". |
"signatureValue" | Signature value encoded in hex. |
"HASsignedAttributes" | "1" if signedAttributes (authenticatedAttributes) are present; "0" if not. |
"DigestOfSignedAttrs" | Computed digest over signed attributes, if present, using digestAlgorithm. |
"DigestOfeContent" | Computed digest over eContent, if present, using digestAlgorithm. |
"signingTime" | signingTime attribute in format
"2005-12-31 23:30:59" |
"messageDigest" | messageDigest attribute in hexadecimal format, if present |
"pssParams" | Parameters used for RSA-PSS (if applicable). |
"HASsigningCertificate" | "1" if an ESS signingCertificate is present; "0" if not. |
"signingCertHash" | certHash value of ESS signing certificate, if present, encoded in hex. |
"HASalgorithmProtection" | "1" if a cmsAlgorithmProtection attribute is present; "0" if not. |
By default, the function queries the first signerInfo in the file.
To query the Nth signerInfo append
"/N" to the query string,
e.g.
"signerInfoVersion/2" to find the version number of the second signerInfo in the file.
See Also