aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-30 21:41:14 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-30 23:23:58 +0200
commitcff26040d8e4019e2c9db950d7986f6422c6711b (patch)
treee6729cdf3678e5322922a4cc7e3ab29b922d930e /qpdf
parentce19471f180d764bbcf5990dea5f60d4cd217dc7 (diff)
downloadqpdf-cff26040d8e4019e2c9db950d7986f6422c6711b.tar.zst
Using insecure crytpo from the CLI is now an error by default
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qpdf.testcov2
-rw-r--r--qpdf/qtest/qpdf.test13
2 files changed, 7 insertions, 8 deletions
diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov
index d679fa25..92ac66f8 100644
--- a/qpdf/qpdf.testcov
+++ b/qpdf/qpdf.testcov
@@ -605,7 +605,7 @@ QPDFWriter exclude from object stream 0
QPDF_pages findPage not found 0
QPDFJob overlay page with no resources 0
QPDFObjectHandle check ownership 0
-QPDFJob weak crypto warning 0
+QPDFJob weak crypto error 0
qpdf-c called qpdf_oh_is_initialized 0
qpdf-c registered progress reporter 0
qpdf-c called qpdf_oh_new_uninitialized 0
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index 4dcf7384..d8359f75 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -3983,16 +3983,15 @@ $td->runtest("128-bit with AES: no warning",
' minimal.pdf a.pdf'},
{$td->STRING => "", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
-# Note: we intentionally have exit status 0 for this warning.
-$td->runtest("128-bit without AES: warning",
+$td->runtest("128-bit without AES: error",
{$td->COMMAND => 'qpdf --encrypt "" "" 128 -- minimal.pdf a.pdf'},
- {$td->REGEXP => "Pass --allow-weak-crypto to suppress",
- $td->EXIT_STATUS => 0},
+ {$td->REGEXP => "Pass --allow-weak-crypto to enable",
+ $td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
-$td->runtest("40-bit: warning",
+$td->runtest("40-bit: error",
{$td->COMMAND => 'qpdf --encrypt "" "" 40 -- minimal.pdf a.pdf'},
- {$td->REGEXP => "Pass --allow-weak-crypto to suppress",
- $td->EXIT_STATUS => 0},
+ {$td->REGEXP => "Pass --allow-weak-crypto to enable",
+ $td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
show_ntests();