Conversation
- Added appearance, document, execute, extract, fonts, forms, images, initials, resources, types, and verify core files. - Included internal implementations.
- Enhanced signing and verification logic (PDFxref, trailer, catalog, etc.). - Improved certificate and key usage handling in verify package.
- Added AWS KMS, Azure Key Vault, Google Cloud KMS, and CSC signer implementations. - Included PKCS#11 signer support.
- Added setup-dss.sh and verify_pdfs.sh utility scripts.
- Updated CLI source files (sign.go, verify.go) to integrate new core logic. - Updated go.mod/go.sum dependencies. - Updated CI workflow and README.
- Updated revocation package. - Deleted legacy sign.go. - Removed unused test resources.
- Added go.mod and go.sum for modular signer packages (AWS, Azure, GCP, CSC, PKCS#11).
- Added comprehensive unit tests for all packages (core, signers, verify). - Included test fixtures in testfiles/ directory. - Updated existing tests to align with refactoring.
- Fixed unchecked errors in renderer.go (errcheck). - Fixed unkeyed struct literals in appearance.go (govet). - Fixed empty branch in verify.go (staticcheck). - Verified with golangci-lint run (0 issues).
…ification - Update VerifySignature to correctly handle DocTimeStamp (ETSI.RFC3161) by parsing TSTInfo from raw bytes and verifying against the PDF byte range without overwriting content. - Enforce strict signature validation in sign_test.go (failure on invalid signatures). - Update sign tests to use SHA-512 explicitly to improve stability. - Exclude testfile_multi.pdf from sign tests as it contains legacy SHA-1 signatures that are no longer valid.
- Restore test coverage for testfile_multi.pdf by adding TestSignPDF_AppendToMultiSig. - Validates that signing works on files with existing signatures (some of which may use older algorithms), checking only the validity of the newly appended signature.
- Propagate AtTime logic to certificate verification. - Ensure VerifyResult.Valid is set to false if constraint checks fail. - Add tests for VerifyOptions (MinRSAKeySize, AllowedAlgorithms).
- Renamed VerifyOptions.CurrentTime to AtTime for consistency. - Resolved errcheck and staticcheck lint errors in tests.
- Updated VeraPDF download URL to 1.28.2 (official release) as GitHub latest asset is missing. - Allowed DSS Validation to fail without breaking the build (missing Maven artifact).
- Update URL to 1.28.2 (official release) via HTTP. - Implement headless installation using auto-install.xml. - Re-enable Corpus Security Test.
- Refactor VerifySignature to return structured errors - Introduce verify/errors.go for custom error types - Update Signer struct to hold ValidationErrors - Isolate legacy test files in testfiles/compatibility - Update Tests to use errors.As for robust error checking - Fix test file cleanup race condition
- Revert verifySignedFile to use os.Rename - Introduce verifyIntermediateFile for non-final test steps - Silence os.Remove errors in test cleanups - Remove copyFile helper function
- Add curl timeouts to setup-dss.sh health check - Check for container termination inside the wait loop - Optimize Dockerfile.dss to use java -jar instead of mvn spring-boot:run
- Tail container logs periodically during wait loop - Verify port mapping status during health check - Ensure container is still running throughout the loop
- Restore COUNT initialization in setup-dss.sh - Update go.yml to use correct test name TestValidateDSSValidation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request represents a comprehensive overhaul of the
pdfsignlibrary. It introduces a major API refactoring to a modern Fluent API model and significantly extends functionality across the board.We have moved away from the legacy functional options pattern to improve developer experience and added robust support for new capabilities like advanced appearance customization, form handling, and comprehensive external signer integrations.
Key Changes
1. Fluent API Model
We have replaced the legacy
SignWithOptionsand VerifyWithOptions patterns with a chainable builder interface.Before (Legacy):
After (New Fluent API):
2. Extended Functionality
We have significantly expanded the library's capabilities:
3. External Signer Integrations
Added distinct modules providing implementations for major remote signing services. These serve as production-ready examples of how to integrate external KMS providers without bloating the core library.
signers/awssigners/gcpsigners/azuresigners/cscsigners/pkcs114. Code Quality & Testing
*_test.gocoverage added for all packages.testfiles/.errcheck,govet, andstaticcheckissues; strict linting enforced.Breaking Changes
pdfsign.Sign()andpdfsign.Verify()top-level functions are deprecated and will be removed in a future release. Please migrate topdfsign.Open().Sign()andpdfsign.Open().Verify()immediately.types.gofor new definitions.Verification
go test ./...to execute the new test suite.scripts/verify_pdfs.shto validate generated signatures against DSS (if configured).