diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-10-18 15:18:45 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-10-18 16:45:15 +0200 |
commit | a237e9244512951e47cca0251aed00d8094de469 (patch) | |
tree | b432b39abd85cff023d7587a5880ed087ff56fc6 /qpdf/qtest/qpdf.test | |
parent | ac9c1f0d560540fda821b2775a475c71b47cb3a0 (diff) | |
download | qpdf-a237e9244512951e47cca0251aed00d8094de469.tar.zst |
Warn when -accessibility=n will be ignored
Also accept -accessibility=n with 256 bit keys even though it will be
ignored.
Diffstat (limited to 'qpdf/qtest/qpdf.test')
-rw-r--r-- | qpdf/qtest/qpdf.test | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index d07a54c5..1aff3d21 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -1399,6 +1399,9 @@ my @encrypted_files = ['XI-R6,V5,U=view,O=master', 'master', '-print=low', -2052, 1, 1, 1, 0, 1, 1, 1, 1, 1], + ['XI-R6,V5,U=view,O=master', 'master', + '-accessibility=n', -4, # -accessibility=n has no effect + 1, 1, 1, 1, 1, 1, 1, 1, 1], ['XI-long-password', 'qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm'], ['XI-long-password', 'qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv'], ); @@ -1501,12 +1504,20 @@ foreach my $d (@encrypted_files) # password. $upass = ""; } + my $accessibility_warning = ""; + if (($R > 3) && ($eflags =~ /accessibility=n/)) + { + $accessibility_warning = + "qpdf: -accessibility=n is ignored" . + " for modern encryption formats\n"; + } $td->runtest("encrypt $file", {$td->COMMAND => "qpdf --static-id --no-original-object-ids -qdf" . " $eflags $file.enc $file.enc2"}, - {$td->STRING => "", - $td->EXIT_STATUS => 0}); + {$td->STRING => $accessibility_warning, + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); $td->runtest("check /P", {$td->COMMAND => "qpdf --show-encryption --password=\"$pass\"" . |