Skip to content

Commit

Permalink
doc: Document experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
famoser committed Dec 28, 2024
1 parent b1e9824 commit 020e6c6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
Binary file not shown.
15 changes: 11 additions & 4 deletions specification/examples/signed/sign.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# How to sign a PDF

options:
- not supported by pdftk, qpdf
- open-pdf-sign badly-written wrapper around Java PDFBox
- pdfsig generates invalid certificates, complex operations
- adobe acrobat feature hard to find ("use certificate"), touches/destroys file structure

## pdfsig

generate certificate:
- gpgsm --generate-key (RSA, subject name CN=Florian Moser, self-signed yes)
- gpgsm --import, then paste the certificate followed by CTRL+D
- gpgsm --fingerprint, the copy ID field (e.g. `0x9C1A23DA`)

apply certificate:
- pdfsig signature.pdf signature_signed.pdf -add-signature -backend GPG -nick 0x9C1A23DA
- pdfsig signature.pdf signature_signed.pdf -add-signature -backend GPG -nick 0x9C1A23DA (but observe errors in output)
- pdfsig signature_sodapdf.pdf signature_sodapdf_signed.pdf -add-signature -backend GPG -nick 0x9C1A23DA (but resulting file invalid)
- observe that signature of both files are invalid

review of other tools:
- not supported by pdftk, qpdf
- open-pdf-sign bad wrapper around Java PDFBox
Binary file not shown.
Binary file not shown.
Binary file modified specification/examples/signed/signature_signed.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 020e6c6

Please sign in to comment.