[Libreoffice-commits] core.git: vcl/source
Tor Lillqvist
tml at collabora.com
Fri Feb 27 00:50:03 PST 2015
vcl/source/gdi/pdfwriter_impl.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit ce0e240ef10566f1cc334386dbde83b43ebb9281
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Feb 27 10:36:57 2015 +0200
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
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b435e84..aedb48b 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;
More information about the Libreoffice-commits
mailing list