Commit Graph

79 Commits

Author SHA1 Message Date
Paul van Brouwershaven
2096c7e091 Fix test filename 2024-12-16 15:36:24 +01:00
Paul van Brouwershaven
b9112bb85b Add initial support for signature appearance 2024-12-16 15:05:27 +01:00
Paul van Brouwershaven
e5cdb61bea Refactor object handling 2024-12-11 16:24:26 +01:00
Paul van Brouwershaven
0d7470938e Fix loopclosure 2024-11-14 14:11:15 +01:00
Paul van Brouwershaven
bacc810a68 Fix linting errors 2024-11-14 13:33:46 +01:00
Paul van Brouwershaven
7946d5266d Fixes and support for ApprovalSignature and TimeStampSignature 2024-11-14 13:00:58 +01:00
Paul van Brouwershaven
6ad18001af Add size of the raw issuer which is added by AddSignerChain 2024-08-08 12:55:28 +02:00
Paul van Brouwershaven
77cc6791aa Refactor and improve xref stream writing
- Split writeXrefStream into smaller, focused functions
- Improve error handling and messages in xref related functions
- Enhance code readability and maintainability
- Use io.WriteString for more efficient string writing

This refactoring aims to make the xref stream writing process more modular, easier to understand, and slightly more efficient, while maintaining the existing functionality.
2024-07-07 17:38:17 +02:00
Paul van Brouwershaven
08b31dc8f9 Add error handling for context.InputFile.Seek operation 2024-07-07 16:42:04 +02:00
Paul van Brouwershaven
a0da9873d4 Fix writeXrefTable to handle PDFs with multiple revisions
- Refactor xref table writing logic to correctly parse existing entries
- Add support for variable first object ID in xref table
- Implement dynamic calculation of new xref entries
- Improve error handling and reporting

This change resolves issue #4 with malformed xref tables when signing PDFs
that have undergone multiple revisions.
2024-07-07 16:42:04 +02:00
Daniel Hernández
c34fd5f0cc test: add test to cover /Names in catalog 2024-03-14 20:12:02 +01:00
Daniel Hernández
5a0cd0a9b9 fix: add embedded file(s) to catalog 2024-03-14 20:12:02 +01:00
Paul van Brouwershaven
4fb6fafba6 Use UTF-16BE encoding when required
Fix #2
2023-03-10 09:10:05 +01:00
Paul van Brouwershaven
e0d0063ef4 Fix loopclosure 2023-03-09 16:16:00 +01:00
Paul van Brouwershaven
007b08d4d1 Replace deprecated ioutil package 2023-02-20 15:46:37 +01:00
Paul van Brouwershaven
d3f4c77359 Remove unused function 2022-07-15 17:32:33 +02:00
Paul van Brouwershaven
29901d0b08 Improve test 2022-07-15 17:23:46 +02:00
Paul van Brouwershaven
50420e5013 Set default DigestAlgorithm with SHA256 2022-07-15 17:22:57 +02:00
Paul van Brouwershaven
dcc44d5779 DigestAlgorithm & SigningCertificate attribute 2022-07-15 15:42:10 +02:00
Paul van Brouwershaven
5a4ccb37cc Fix spelling 2022-07-04 17:17:36 +02:00
Paul van Brouwershaven
f3ce4f488a Update build flag 2022-07-04 17:16:14 +02:00
Paul van Brouwershaven
ee03a9e538 Can't run in parallel because reusign keys & certs 2022-07-04 17:14:05 +02:00
Paul van Brouwershaven
5d4de61c21 Make placeholder constant 2022-07-04 17:11:41 +02:00
Paul van Brouwershaven
8e1e8ca8bb Simplify 2022-06-30 18:13:37 +02:00
Paul van Brouwershaven
d1962b6c98 Switch TSA for tability 2022-06-30 18:12:34 +02:00
Paul van Brouwershaven
4fe43c0794 Use timestamp package for TSA 2022-06-30 18:05:16 +02:00
Paul van Brouwershaven
44ac3c7806 Check errors 2022-06-30 18:04:25 +02:00
Paul van Brouwershaven
dc48ea3133 Migrate to github 2022-06-29 21:09:28 +02:00
Paul van Brouwershaven
3caf640baa Retry with expected signature lenght 2022-06-29 21:07:59 +02:00
Paul van Brouwershaven
2ce268ea4d Fix fpr PDF 2.0 xref tables 2022-06-29 21:04:33 +02:00
tigp
c0f2009983 Use 1 for certification 2018-08-13 18:29:29 +02:00
tigp
ac2be7b9c2 set certificate type to 1 if not provided 2018-07-16 00:12:09 +02:00
tigp
89b4a16334 Enumerate signature type from 1 instead of 0 2018-07-15 23:26:04 +02:00
tigp
9e782e9dd9 Revert "Use CertType zero value as nothing"
This reverts commit e8214eecbf.
2018-07-09 02:01:38 +02:00
tigp
e8214eecbf Use CertType zero value as nothing 2018-07-09 02:00:50 +02:00
tigp
7d7627a52f refactor permission names 2018-06-29 18:48:55 +02:00
tigp
6b914d1698 WIP - use another API for signing 2018-06-29 18:12:49 +02:00
tigp
af18f0bd57 Use uint for CertType for better compatibility 2018-06-24 19:34:55 +02:00
Paul van Brouwershaven
eaa47cac54 verify.Verify to verify.File, err format 2018-05-18 11:21:34 +02:00
tigp
be30b42458 Move failed files to testfiles/failed folder 2018-05-01 23:24:56 +02:00
tigp
cac6f30626 Add name for parallel test 2018-05-01 18:48:50 +02:00
tigp
dc9afd860d Test in parallel. Remove logging 2018-05-01 17:33:39 +02:00
tigp
6694f59c89 Remove verification response logging 2018-05-01 16:26:22 +02:00
tigp
0acb66fd3b Remove tmp file if test failed 2018-05-01 16:14:53 +02:00
tigp
770e29316e Verify output file instead of input file 2018-05-01 16:13:12 +02:00
tigp
9458dd650e Add verification to tests 2018-05-01 15:53:44 +02:00
tigp
ee5a588d2e Fix xref start position 2018-05-01 15:06:48 +02:00
Jeroen Bobbeldijk
db697b3d49 Use static file in code for benchmark to prevent too much seeking on an actual file which is slow in OSX. 2017-10-08 10:29:58 +02:00
Jeroen Bobbeldijk
8f1562c545 Less TSA, fix benchmark 2017-09-30 15:51:01 +02:00
Jeroen Bobbeldijk
bb93a21027 Calculate chain length, certificate length and signature length, only open file once in benchmark 2017-09-30 15:44:50 +02:00