diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-23 14:55:07 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-05 15:23:41 +0100 |
commit | 8dc896d2cb51cf5930571f501b9a4194ac2b006d (patch) | |
tree | b3eca2c755011d66ee4199ca19993b90ee37930a /vcl | |
parent | acaa1ece4bac92a13e5c9e351c720904ae80384c (diff) |
tdf#84881: Actually check the status of the time stamp response
Change-Id: If8d64b1e03c8318cd3329cd258131fddeb86fa7b
(cherry picked from commit d1132ff3895aa67ed662446ef6f43612124455ae)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 535ed7b28c3d..8280f2977734 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6906,6 +6906,13 @@ bool PDFWriterImpl::finalizeSignature() SAL_INFO("vcl.pdfwriter", "TimeStampResp received and decoded, status=" << PKIStatusInfoToString(response.status)); + if (response.status.status.len != 1 || + (response.status.status.data[0] != 0 && response.status.status.data[0] != 1)) + { + SAL_WARN("vcl.pdfwriter", "PDF signing: Timestamp request was not granted"); + return false; + } + NSSCMSAttribute timestamp; timestamp.type.type = siBuffer; |