v0.10.2
A Release About Digital Signatures
We are excited to announce a release focused on digital signature validation, certificate management, and improved image handling.
This update introduces several important new features and enhancements!
⚠️ Warning for pdfcpu backend users:
Due to a necessary force push, please make sure to perform a fresh clone or pull to avoid any inconsistencies.
1. Quickstart for current users
In order to get going with this release you need to reset your configuration. Check the v0.9.1 Release notes for instructions. Any pdfcpu CLI command will print a corresponding warning.
After the upgrade your config dir will look like:
2. Validate Signatures
pdfcpu now provides support for validating digital signatures embedded in PDF documents:
$ pdfcpu sig val sample1.pdf
optimizing...
1 form signature (authoritative, visible, signed) on page 1
Status: signature is valid
Reason: document has not been modified
Signed: 2025-03-18 10:07:18 +0000
By using -full we can look at all the details:
$ pdfcpu sig val -full sample1.pdf
optimizing...
1:
Type: form signature (authoritative, visible, signed) on page 1
Status: signature is valid
Reason: document has not been modified
Signed: 2025-03-18 10:07:18 +0000
DocModified: false
Details:
SubFilter: ETSI.CAdES.detached
SignerIdentity: John Doe
SignerName: John Doe
ContactInfo:
Location: oesterreich.gv.at PDF Signatur
Reason: Signatur
SigningTime: 2025-03-18 10:07:18 +0000
Field: Signature15430ca9-5df6-4b11-b423-ab48ec2439d6
Signer:
Timestamp: false
LTVEnabled: false
PAdES: B-B
Certified: false
Authoritative: true
Certificate:
Subject: John Doe
Issuer: a-sign-premium-mobile-05
SerialNr: 614a81f67
Valid From: 2023-01-04 10:39:36 +0000
Valid Thru: 2028-01-04 10:39:36 +0000
Expired: false
Qualified: true
CA: false
Usage:
Version: 3
SignAlg: ECDSA
Key Size: 256 bits
SelfSigned: false
Trust: Status: ok
Reason: cert chain up to root CA is trusted
Revocation: Status: ok
Reason: not revoked (CRL check ok)
RootCA:
Subject: a-sign-premium-mobile-05
Issuer: A-Trust-Root-05
SerialNr: 36a009c2
Valid From: 2022-12-19 09:15:01 +0000
Valid Thru: 2029-07-10 07:15:01 +0000
Expired: false
Qualified: false
CA: true
Usage:
Version: 3
SignAlg: RSA
Key Size: 4096 bits
SelfSigned: false
Trust: Status: ok
Reason: CA
Each detected signature is categorized into one of the following:
| Type | Intention | Visibility | |:----------------------------|:--------------------------------------------------|:-------------------------| | Form Signature | Authenticate form data and signer identity | Visible or invisible | | Page Signature | Authenticate page content and appearance | Visible or invisible | | Document Timestamp Signature (DTS) | Prove document existence at a point in time | invisible | | Usage Rights Signature | Define locked features, detect tampering | invisible |
You can validate signatures using the command:
pdfcpu signatures validate [-a(ll) -f(ull)] inFile
-
-a(ll): Validate all signatures found in the document. -
-f(ull): Comprehensive output, including certificate chain building and revocation checking (CRL/OCSP).
By default, pdfcpu will always attempt to validate as much as possible, even without the -full flag.
A -fast validation mode may be introduced in a future release to limit the depth of validation when speed is critical.
Instead of reporting PAdES levels like PAdES-E-BES (Basic Electronic Signature) and PAdES-E-EPES (Explicit Policy Electronic Signature) as suggested in the PDF 2.0 specification (ISO 32000-2), pdfcpu focuses on ETSI Basic Profile levels as laid out in ETSI EN 319 142-1 V1.2.1 (2024-01) 6.1.:
| PAdES Level | Description | |:------------|:------------------------------------| | B-B | Basic electronic signature | | B-T | B-B with trusted timestamp or DTS | | B-LT | B-T with embedded CRL and OCSP data | | B-LTA | B-LT with DTS |
Current limitations mostly involve either older encryption standards restricted by the Go runtime for security reasons, or missing checks for permission violations after successful signature validation.
Learn more about this command in the Signatures Documentation.
3. Extended Configuration
We are introducing three new configuration parameters:
# HTTP timeout in seconds for CRL revocation checking.
timeoutCRL: 10
# HTTP timeout in seconds for OCSP revocation checking.
timeoutOCSP: 10
# Preferred certificate revocation checking mechanism:
# crl
# ocsp
preferredCertRevocationChecker: crl
When performing revocation checks, pdfcpu must fetch CRLs (Certificate Revocation Lists) or make OCSP requests to remote servers. Network conditions vary, and without proper timeouts, validation could hang indefinitely. Configurable timeouts allow better control over signature validation performance.
Some environments prioritize OCSP for real-time checks, while others prefer CRL based on organizational policies. Allowing users to configure the preferred method gives flexibility and aligns with security and compliance requirements.
4. Manage Certificates
To facilitate signature validation, pdfcpu now supports certificate management.
Built-in trust store:
- pdfcpu comes preloaded with a set of EU Root CAs backed by by the EU/EEA Trusted List to help verify European electronic signatures.
- You can list, import, and reset your trusted certificates.
Certificate management commands:
pdfcpu certificates list
pdfcpu certificates import inFile...
pdfcpu certificates reset
Importing certificates ensures that only compatible certificates are accepted into the trust store.
Once imported, certificates can be freely organized within the pdfcpu config directory under certs/.
Right now pdfcpu cert import accepts .p7c and .pem files.
Support for additional certificate file formats like .cer is planned.
Learn more about this command in the Certificates Documentation.
5. Import Multi-Page TIFF Files
pdfcpu is now capable of handling multi-page TIFF images!
When importing a TIFF with multiple frames, pdfcpu will automatically:
- Extract each frame.
- Create a corresponding PDF gallery, where each page contains one image from the TIFF.
This feature is particularly useful for digitizing scanned documents and archiving multi-page image files into searchable PDF archives.
Learn more about image handling in the Image Import Documentation.
🙏🏻 Thanks 🙏🏻
everybody for testing and feeding back your bug reports. Shoutouts go to @fancycode, @vishal-at and @deining for putting time into submitting PR's.
Changelog
- cd39124e5eaa9138f2a3990e11ce19e75cda471a Fix config parsing, bump version
- 4804a29a6162101ea510177f47882baa1ed2cdb4 Bump version, clean up
- 106feff79227e9ea65af809a1d3b6eec2d1b6e23 Fix #1116, clean up
- f11409b30b203f505dcf98c494f0f0061625f5de Fix #1111
- ba010c9e3d53193243f4cd2923857847adafbbda Fix #1114
- 3eaac1dc6032e6649fed59753d82ccea68d64525 Add signature command
- ce09a835d5256dbea7efba9492b0a495b6c3422c Fix form field validation.
- 4b9cd31417fd47737d9d0da287d608196181bed5 Fix #1099
- ed8b0f9d0341bf5f4220b71b7e6cb00ede3391b1 Fix #1016
- f188cec0e01f990ee8f9cf73485fed945057de94 Fix #1017
- d8da983fdf904f34783060bbe87a1719b584ab4a Fix #1015
- 05bd28049f95fd1b7226399522a9da6db4d4c79c Fix #1064
- 6015ff8682cb6188d53897c6b72e96246d0a136b Fix #1100
- bad35cb5ac9f2af19cd56dcea86e491ab9df9692 Fix #1089
- 1d3c07e2d80e8d34d175a604b335cd06dc7dce0f Fix #1098
- 0e1db94b0c711c52e485da593f7a89ad5561af15 Fix #1090
- 9310068b99aaa34968c6680cea9a80855e2e90ee Fix #1072
- eb132fb5f8fbed5c18f0073c15cffbf63b108615 Avoid duplicate keyword search (#1066)
- b8f82d6f91e2ea79f7ca3965a48efc25072aa671 Fix #1073, #1092, bump go.mod
- 4a2f04f3a268f556a4e3145d3978690b7b559cc7 Fix #1041
- 9b1ead84ae1e8c648a6c521a8e76e673ba267019 Fix #1081
- a966a9c8404d6942e39ecd3d7931569d21de13cf Fix #1047
- 6a2b4f7a4985697a6ca5dd914a5ea93b324d65db Fix #1065
- b60bc1c5ec33a66ba86c02816c745cf67be3e409 Fix #1076
- 4ba7f28f5504c6866b20b8057309efef797f8efe Disable optimization for verbose validate via CLI
- a9d78631817e66cf75d0de75d208be18aea753de Fix #1080
- b05d39596f8f8b0d68a150d6a7dd9da2fdc7c5f9 Fix #1077, clean up
- 4379427eceb6c1d671cf3753b25d577af08efad6 Fix #888
- a73d706ebd100d98373460fa8fe5d7d70cf7e84b Fix #1025
- 3e64e1f88a6424519f6e10a96f6b933afdadf440 Handle duplicate keys
- 4e0e0db8c786122a8efbe5fb71c070810a4aca1d Fix #1049
- 1e4cb9fec11aef08d3501093cbd7cc69d017ce90 Fix #1058 Use relaxed validation for dict=Square entry=RD (#1063)
- 68220688b449a175c9c1a0f56d4769cc7fb59a3c Synopsis: improve mode usage message (#1036)
- 0f856f7d6ee43b3f82c0e243330dad9284220564 Implement dependabot (#1028)
- 6659896d6d799c29bb24f6d4026028c967072096 Fix typos (#1034)
- 83c895ed336b740f4d69c2b7be173e6f4cd90aaa Support float page rotation with zero fractional part. (#1019)
- 01d72b13616093c27e44979ea1706240fb685e24 Handle missing page tree node type for pages. (#1021)
- 56bed9fbf1556513f3f33946036768ad51c1bde4 Fix typos (#1029)