diff options
author | Masamichi Hosoda <trueroad@trueroad.jp> | 2019-10-18 12:41:53 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-10-22 22:20:21 +0200 |
commit | 5a842792b69550cf441d4598feb1daff2fa8c83f (patch) | |
tree | 5c0bb58f6028cf48aab01f421a79b68fd92688ed /libqpdf/QPDFWriter.cc | |
parent | cdc46d78f441526d566c9da195e79b900617bb13 (diff) | |
download | qpdf-5a842792b69550cf441d4598feb1daff2fa8c83f.tar.zst |
Parse Contents in signature dictionary without encryption
Various PDF digital signing tools do not encrypt /Contents value in
signature dictionary. Adobe Acrobat Reader DC can handle a PDF with
the /Contents value not encrypted.
Write Contents in signature dictionary without encryption
Tests ensure that string /Contents are not handled specially when not
found in sig dicts.
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index e7eae5c6..a31f5da9 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -1695,7 +1695,7 @@ QPDFWriter::unparseObject(QPDFObjectHandle object, int level, { QTC::TC("qpdf", "QPDFWriter no encryption sig contents"); unparseChild(object.getKey(key), level + 1, - child_flags | f_hex_string); + child_flags | f_hex_string | f_no_encryption); } else { @@ -1866,6 +1866,7 @@ QPDFWriter::unparseObject(QPDFObjectHandle object, int level, std::string val; if (this->m->encrypted && (! (flags & f_in_ostream)) && + (! (flags & f_no_encryption)) && (! this->m->cur_data_key.empty())) { val = object.getStringValue(); |