Commit 70ae58c0355e06cfe7d97426b28a61ab419ef276
1 parent
a8715c49
better testing of V4
git-svn-id: svn+q:///qpdf/trunk@826 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
6 changed files
with
830 additions
and
5 deletions
TODO
| @@ -43,11 +43,6 @@ | @@ -43,11 +43,6 @@ | ||
| 43 | (http://delphi.about.com). .. use at your own risk and for whatever | 43 | (http://delphi.about.com). .. use at your own risk and for whatever |
| 44 | the purpose you want .. no support provided. Sample code provided." | 44 | the purpose you want .. no support provided. Sample code provided." |
| 45 | 45 | ||
| 46 | - * R = 4, V = 4 encryption. | ||
| 47 | - | ||
| 48 | - - Update C API for R4 encryption | ||
| 49 | - | ||
| 50 | - | ||
| 51 | 46 | ||
| 52 | 2.2 | 47 | 2.2 |
| 53 | === | 48 | === |
qpdf/qtest/qpdf.test
| @@ -1078,6 +1078,23 @@ $td->runtest("make sure there is no xref stream", | @@ -1078,6 +1078,23 @@ $td->runtest("make sure there is no xref stream", | ||
| 1078 | {$td->REGEXP => "\\s*0\\s*", $td->EXIT_STATUS => 0}, | 1078 | {$td->REGEXP => "\\s*0\\s*", $td->EXIT_STATUS => 0}, |
| 1079 | $td->NORMALIZE_NEWLINES); | 1079 | $td->NORMALIZE_NEWLINES); |
| 1080 | 1080 | ||
| 1081 | +# Look at some actual V4 files | ||
| 1082 | +$n_tests += 8; | ||
| 1083 | +foreach my $d (['--force-V4', 'V4'], | ||
| 1084 | + ['--cleartext-metadata', 'V4-clearmeta'], | ||
| 1085 | + ['--use-aes=y', 'V4-aes'], | ||
| 1086 | + ['--cleartext-metadata --use-aes=y', 'V4-aes-clearmeta']) | ||
| 1087 | +{ | ||
| 1088 | + my ($args, $out) = @$d; | ||
| 1089 | + $td->runtest("encrypt $args", | ||
| 1090 | + {$td->COMMAND => "qpdf --static-aes-iv --static-id" . | ||
| 1091 | + " --encrypt '' '' 128 $args -- enc-base.pdf a.pdf"}, | ||
| 1092 | + {$td->STRING => "", $td->EXIT_STATUS => 0}); | ||
| 1093 | + $td->runtest("check output", | ||
| 1094 | + {$td->FILE => "a.pdf"}, | ||
| 1095 | + {$td->FILE => "$out.pdf"}); | ||
| 1096 | +} | ||
| 1097 | + | ||
| 1081 | show_ntests(); | 1098 | show_ntests(); |
| 1082 | # ---------- | 1099 | # ---------- |
| 1083 | $td->notify("--- Content Preservation Tests ---"); | 1100 | $td->notify("--- Content Preservation Tests ---"); |
qpdf/qtest/qpdf/V4-aes-clearmeta.pdf
0 → 100644
No preview for this file type
qpdf/qtest/qpdf/V4-aes.pdf
0 → 100644
No preview for this file type
qpdf/qtest/qpdf/V4-clearmeta.pdf
0 → 100644
No preview for this file type
qpdf/qtest/qpdf/V4.pdf
0 → 100644
No preview for this file type