Intent
Provide a pair of new subcommands:
pdfly sign : take a PDF document and a pair of public/private certificates, and produce a signed PDF document
pdfly check-sign : take a signed PDF document and a public certificate, and check if its signature is valid
Suggested implementation
fpdf2 is already a dependency of pdfly, and combined with endesive could be use to perform signing: https://py-pdf.github.io/fpdf2/Signing.html
endesive could be used to check the signature.
There are some example usages we could support:
pdfly sign input.pdf --p12 certs.p12 -o signed.pdf
Implemented by @moormaster in PR #165
pdfly sign input.pdf --pem certs.pem -o signed.pdf
pdfly sign input.pdf --gpg-pub-key ~/.gnupg/pubring.gpg --gpg-sec-key ~/.gnupg/secring.gpg -o signed.pdf
pdfly check-sign signed.pdf --p12 certs.p12
pdfly check-sign signed.pdf --pem certs.pem
Implemented by @moormaster in PR #166
pdfly check-sign signed.pdf --gpg-pub-key ~/.gnupg/pubring.gpg
Extra useful documentations:
Extra features we could consider:
- display how much does adding the signature increased the file size, in percent
- provide an optional
--inplace / -i flag that would allow to NOT provide an output PDF filepath because the input PDF file would be directly modified
Intent
Provide a pair of new subcommands:
pdfly sign: take a PDF document and a pair of public/private certificates, and produce a signed PDF documentpdfly check-sign: take a signed PDF document and a public certificate, and check if its signature is validSuggested implementation
fpdf2is already a dependency ofpdfly, and combined withendesivecould be use to perform signing: https://py-pdf.github.io/fpdf2/Signing.htmlendesivecould be used to check the signature.There are some example usages we could support:
Implemented by @moormaster in PR #165
Implemented by @moormaster in PR #166
.p7mfile (requested in Verify signed Documents #193)Extra useful documentations:
Extra features we could consider:
--inplace/-iflag that would allow to NOT provide an output PDF filepath because the input PDF file would be directly modified