I am using the following API to verify if a file is signed
CoSign Signature Local > Signature Local COM Methods for Signing and Verifying > SAPICryptCOM Functions > FileIsSignedEx
Example:
SAPI.FileIsSignedEx(
hSession,
SAPI_ENUM_FILE_TYPE.SAPI_ENUM_FILE_OFFICE_XML_PACKAGE,
fileName,
null,
0,
ref isSigned
);
`
This works if the file has a newer signature field. The name of the field in the *.docx file is something like {388F8850-55AF-4729-BE27-F1E5FCAC5A8F}
However if the .docx file contains an older signature field then the function always returns 0(false) even if the file is signed. The name of the older signature field is ArGrDigsig2
The related functions like SignatureFieldInfoGet
also return nothing for the older field even if it is signed today.
Any idea what is happening here?