Search code examples
c#docusignapicosign-api

FileIsSignedEx is not getting the information if the signature field is old


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?

Old field and new field


Solution

  • Older signature field named "ArGrDigsign" are ARX CoSign Legacy signature fields. These signatures are proprietary signatures of ARX CoSign for office documents. These signatures are implemented with MS macros and can be used only from MS Office applications. Only the new standard Office or DocuSign signature lines signatures can be used also via DSA APIs like SAPI Local.