summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfwriter_impl.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-27 10:36:57 +0200
committerAndras Timar <andras.timar@collabora.com>2015-03-05 16:46:15 +0100
commit2fdc9c2cf1b9797f090b9b3c5fec96f4b0352bb5 (patch)
tree582b10b6c7408d8be92f3d1802c095b5c2a11636 /vcl/source/gdi/pdfwriter_impl.cxx
parentc54a53d96d1280e86ef55c69bab7fa99f67b3314 (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 (cherry picked from commit ce0e240ef10566f1cc334386dbde83b43ebb9281)
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-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 b07859c69f58..7e3daf6c398e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6912,7 +6912,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;
@@ -6934,7 +6934,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;