podofo / podofo

A C++17 PDF manipulation library

Home Page:https://podofo.github.io/podofo/documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can podofo support pdf to open LTV signatures?

HankoZhou opened this issue · comments

PDF LTV signatures, or long-term validation signatures, are digital signatures that are embedded in PDF documents and include a timestamp of the time of signing. This timestamp helps to validate the signature's authenticity, even if technological changes occur in the future.
Can podofo support pdf to open LTV signatures?

The question is a bit vague since it does not really specify better what it is intended with "opening" LTV signatures, and I know it can be a complex subject. If the request was if PoDoFo supports validating a signature and ensure the certificates of the signer and the timestamp authority were valid at the moment of the signing that won't probably be implemented in PoDoFo as this is a very high level functionality. PoDoFo could implement some facilities to retrieve the necessary information to validate, though. For example it could:

  • Return the raw bytes of the signed hash of the document;
  • Recompute the raw bytes of the hash of the document that was signed;
  • Return the certificate of the signer and other attributes of the CMS. Note that signing time today is most often already accessibile through PdfSignature::GetSignatureDate with modern signatures, and not inside the CMS structure;
  • Return the raw bytes of the CMS block in the signature /Contents value for external processing;
  • Return all the certificates supplied by the document for the LTV validation.

I leave this message here as possible ideas for the future, but can't promise anything of this list can be implemented anytime soon.