Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample code for PAdES LTV? #186

Open
timotheeg opened this issue Feb 17, 2023 · 4 comments
Open

Sample code for PAdES LTV? #186

timotheeg opened this issue Feb 17, 2023 · 4 comments

Comments

@timotheeg
Copy link
Contributor

Would anyone have sample code to generate and inject a valid PAdES LTV signature (with cert chains, OCSP response, etc), in a pdf file ?

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 12, 2023
@parallels999
Copy link

#116 (comment)

@stale stale bot removed the wontfix label Aug 23, 2023
@vbuch
Copy link
Owner

vbuch commented Nov 7, 2023

Just a note to anyone interested in implementing LTV:

This is where that starts: https://www.etsi.org/deliver/etsi_ts/102700_102799/10277804/01.01.01_60/ts_10277804v010101p.pdf

@dhensby
Copy link
Collaborator

dhensby commented Nov 23, 2023

I have done quite a bit of work to do LTV signatures, however they don't validate in acrobat because apparently the LTV signatures require a double signing of the document to be recognised as valid and I've not been able to get that working. This was a long time ago so I've forgotten the details and where I found the specification for LTV signatures in acrobat.

On the whole, the LTV signing is just about building up the CMS signature object to contain all the elements that are needed to perform offline signature validation. That means, creating the base signature and then including the revocation response objects too (OCSP, etc).

To do this I used @peculiar/asn1-cms (and others packages by them) to build the signature object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants