Commit Graph

400 Commits

Author SHA1 Message Date
Michael R Sweet
001dcbb123
Fix testpdfio build - dependencies on pdfio-private.h were missing. 2021-11-29 17:57:49 -05:00
Michael R Sweet
a431d7806f
Fix a few stack/buffer overflow bugs discovered by Bart, Steffan, and Mark from
the Radboud University NL (thanks!)

- Add depth argument to all value read functions that recurse
- Add depth argument to page tree loading code
- Validate xref stream sizes individually to avoid out-of-bounds access to local
  xref buffer.
2021-11-29 17:46:56 -05:00
Michael R Sweet
ec8e900ea5
Add math library to libs. 2021-11-18 19:23:42 -05:00
Michael R Sweet
c73aa7ae20
Add link for builds. 2021-11-11 06:52:23 -05:00
Michael R Sweet
c53786e0e1
Changelog. 2021-11-07 11:29:18 -05:00
Michael R Sweet
1d5310a5f3
Bump version to 1.0b2. 2021-11-07 11:15:35 -05:00
Michael R Sweet
1e33878506
Fix conversion of nul-containing strings to binary.
Move key length checks to a common place.
2021-11-02 09:12:43 -04:00
Michael R Sweet
af07f64bc3
Fix 'make test'. 2021-11-02 07:50:14 -04:00
Michael R Sweet
2f0d622873
Save work on resolving PDF loading issues with random PDFs using different encryption methods and line endings. 2021-11-01 21:30:46 -04:00
Michael R Sweet
6432187dea
Fix sporadic test suite failures caused by greedy whitespace removal in token
reader.

Update read code to handle signal/temporary failures.

Add some more useful debug messages for the encryption code.

Eliminate more warnings from Clang.
2021-10-31 11:12:54 -04:00
Michael R Sweet
9d121335f5
Make sure we free memory used for binary data. 2021-10-31 08:30:08 -04:00
Michael R Sweet
9014ab7a20
Fix some minor Coverity-reported issues (added a check to suppress a warning,
removed an unnecessary check, and removed some dead code)
2021-10-31 07:04:17 -04:00
Michael R Sweet
b3ca129a58
Bump NuGet versions. 2021-10-29 07:42:24 -04:00
Michael R Sweet
fafe24bdb6 Fix Windows builds. 2021-10-26 07:12:41 -04:00
Michael R Sweet
b865390b5d
Update docos. 2021-10-25 22:00:25 -04:00
Michael R Sweet
1d1ff88ebc
Merge pull request #26 from michaelrsweet/crypto
Merge RC4/AES-128 crypto implementation.
2021-10-25 21:56:58 -04:00
Michael R Sweet
8dfc2c6045
Fix LGTM issues. 2021-10-25 21:43:32 -04:00
Michael R Sweet
895738682e
Update DLL exports file. 2021-10-25 21:39:44 -04:00
Michael R Sweet
90ad1e694a
Fix early closing of input PDF. 2021-10-25 21:36:01 -04:00
Michael R Sweet
e2b33a6cbb
Merge branch 'master' into crypto 2021-10-25 21:25:12 -04:00
Michael R Sweet
790cd440ea
Fix up copying objects from unencrypted to AES-encrypted documents (still looks
like there are some issues with strings in dicts)
2021-10-25 21:22:59 -04:00
Michael R Sweet
038046e6d5
Save work on encrypted PDF reading. 2021-10-25 19:36:39 -04:00
Michael R Sweet
45c5a00252
Update Windows DLL exports file. 2021-10-24 11:05:33 -04:00
Michael R Sweet
7e9c0afc23
Update summary text. 2021-10-24 11:03:19 -04:00
Michael R Sweet
234c3a7381
Do some reorganization and start the implementation of decryption. 2021-10-24 10:59:25 -04:00
Michael R Sweet
b7ecaeee07
Implement partial write buffering for AES. 2021-10-23 20:33:12 -04:00
Michael R Sweet
208c3419ff
Fix AES-128 writing/encryption. 2021-10-23 20:09:02 -04:00
Michael R Sweet
dd56317635
Need object when reading/writing encrypted PDFs (to decrypt/encrypt strings),
RC4 writing is now working, AES-128 needs work, AES-256 hasn't been done yet.
2021-10-23 18:08:16 -04:00
Michael R Sweet
3af39d5d1f
Update crypto callback to return the number of output bytes (to account for AES
expansion).
2021-10-23 14:37:25 -04:00
Michael R Sweet
19571d00f2
Fix AES cipher implementation.
Update test program to validate the key expansion using the FIPS-197 example.

Add password-protected RC4 test output.

Add no-password AES-128 test output.
2021-10-23 00:07:13 -04:00
Michael R Sweet
af13376e6d
Update docos. 2021-10-18 23:08:13 -04:00
Michael R Sweet
22c245ffd1 Update pdfioContentSetDashPattern to accept doubles (Issue #25) 2021-10-16 09:41:19 -04:00
Michael R Sweet
095a4c10d4 Fix some memory leaks (Issue #23) 2021-10-16 00:02:31 -04:00
Michael R Sweet
f3689d6b3d Fix all-shared on Linux (Issue #22) 2021-10-15 19:32:08 -04:00
Michael R Sweet
ea126c7e8d
Save work. 2021-10-15 10:40:42 -04:00
Michael R Sweet
e031254531
Fix 'all-shared' target. 2021-10-13 17:15:59 -04:00
Michael R Sweet
493fbca31c
Save work on unit tests for crypto. RC4 and AES are having trouble for some reason... 2021-10-12 17:11:10 -04:00
Michael R Sweet
c24243a2bc
Refactor crypto callback to have separate input/output pointers. Add initial writing support. 2021-10-12 09:13:30 -04:00
Michael R Sweet
0caea44f32
Implement MakeReader/Writer functions. 2021-10-10 23:08:56 -04:00
Michael R Sweet
3de55421b5
New member names to specify type of value. 2021-10-10 22:40:42 -04:00
Michael R Sweet
61a7964d90
Implement pdfioFileSetPermissions. 2021-10-10 22:27:09 -04:00
Michael R Sweet
37e80d67b1
Use new random number function to generate file IDs. 2021-10-09 23:10:46 -04:00
Michael R Sweet
953de26f6b
Add random number generation support. 2021-10-09 23:05:39 -04:00
Michael R Sweet
2245c9d4f5
Move AES code to separate file, prep private API for making keys/contexts/callbacks for encryption. 2021-10-09 10:49:22 -04:00
Michael R Sweet
27e4ce9f42
Update Xcode project to build the SHA-256 code. 2021-10-08 21:14:11 -04:00
Michael R Sweet
9c05f802fc
Add SHA-256 code from RFC 6234. 2021-10-08 18:55:25 -04:00
Michael R Sweet
8aef2bfedd
Fix warnings, update Xcode project. 2021-10-08 14:08:07 -04:00
Michael R Sweet
f425952f36
Tweak coverity Github Actions. 2021-10-08 13:49:48 -04:00
Michael R Sweet
0c6b8f49d2
Tweak coverity Github Actions. 2021-10-08 13:49:48 -04:00
Michael R Sweet
8ad699c93a
Tweak coverity Github Actions. 2021-10-08 13:49:48 -04:00