diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-23 15:27:01 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-05 16:43:39 +0100 |
commit | e5b653562fdcac6036e2818047c471ac1dc19883 (patch) | |
tree | ebe39cc215004e8c127b67ea37c9de044c6a8c86 | |
parent | 8dc896d2cb51cf5930571f501b9a4194ac2b006d (diff) |
tdf#84881: Call NSS_CMSSignerInfo_AddSigningTime() only if not using a TSA
Something is still wrong, Adobe Reader still says the PDF is signed with the
local machine's timestamp, though.
Change-Id: Ic9ed3190901025be48e1de191df976e1aa454822
(cherry picked from commit 7d7c2ab1dffa82cfc0e2d6b15702d965b8b0245b)
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8280f2977734..11fb1ae3a076 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6952,16 +6952,15 @@ bool PDFWriterImpl::finalizeSignature() return false; } } - - if (NSS_CMSSignerInfo_IncludeCerts(cms_signer, NSSCMSCM_CertChain, certUsageEmailSigner) != SECSuccess) + else if (NSS_CMSSignerInfo_AddSigningTime(cms_signer, PR_Now()) != SECSuccess) { - SAL_WARN("vcl.pdfwriter", "PDF signing: can't include cert chain."); + SAL_WARN("vcl.pdfwriter", "PDF signing: can't add signing time."); return false; } - if (NSS_CMSSignerInfo_AddSigningTime(cms_signer, PR_Now()) != SECSuccess) + if (NSS_CMSSignerInfo_IncludeCerts(cms_signer, NSSCMSCM_CertChain, certUsageEmailSigner) != SECSuccess) { - SAL_WARN("vcl.pdfwriter", "PDF signing: can't add signing time."); + SAL_WARN("vcl.pdfwriter", "PDF signing: can't include cert chain."); return false; } |