summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-27 10:36:57 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-27 10:45:32 +0200
commitce0e240ef10566f1cc334386dbde83b43ebb9281 (patch)
treed8012a71eca2f6fd1ee69ff0b34645cb2de56ff1
parent5020ed93a40ea24d259b316a02a30eb868c41c2d (diff)
tdf#84881: Timestamp the right data (NSS version)
Now Adobe Reader is satisfied with the signature timestamp. I just need to figure out how to do the corresponding fix for the Win32 version, too. Change-Id: Ie2cce177a9a356e729ca157b4c181e95a2c60c91
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b435e84978f1..aedb48b90bdd 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6944,7 +6944,7 @@ bool PDFWriterImpl::finalizeSignature()
}
HASH_Begin(ts_hc.get());
- HASH_Update(ts_hc.get(), reinterpret_cast<const unsigned char*>(ts_cms_output.data), ts_cms_output.len);
+ HASH_Update(ts_hc.get(), ts_cms_signer->encDigest.data, ts_cms_signer->encDigest.len);
SECItem ts_digest;
unsigned char ts_hash[SHA1_LENGTH];
ts_digest.type = siBuffer;
@@ -6966,7 +6966,9 @@ bool PDFWriterImpl::finalizeSignature()
src.version.data = &cOne;
src.version.len = sizeof(cOne);
- src.messageImprint.hashAlgorithm = ts_cms_signer->digestAlg;
+ src.messageImprint.hashAlgorithm.algorithm.data = NULL;
+ src.messageImprint.hashAlgorithm.parameters.data = NULL;
+ SECOID_SetAlgorithmID(NULL, &src.messageImprint.hashAlgorithm, SEC_OID_SHA1, NULL);
src.messageImprint.hashedMessage = ts_digest;
src.reqPolicy.type = siBuffer;