[Libreoffice-commits] core.git: xmlsecurity/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Oct 14 16:10:12 UTC 2016
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 28fcdc4fecd373c8142376532004528d3d619306
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Oct 14 18:09:31 2016 +0200
xmlsecurity: avoid checking storage streams of PDF files
DocumentSignatureHelper::isOOo3_2_Signature() checks if the manifest
stream of the ZIP package is signed. A PDF file has no storage, so don't
do that check for that format.
With this, a valid PDF signature is shown as valid in the Digital
Signatures dialog as well.
Change-Id: I58c1cbd665b7c5894d1cfa193061a9370f76c8c4
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index d99590a..c82cff0 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -508,9 +508,11 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
}
//Check if the signature is a "old" document signature, that is, which was created
//by an version of OOo previous to 3.2
+ // If there is no storage, then it's pointless to check storage
+ // stream references.
else if (maSignatureManager.meSignatureMode == SignatureModeDocumentContent
- && bSigValid && bCertValid && !DocumentSignatureHelper::isOOo3_2_Signature(
- maSignatureManager.maCurrentSignatureInformations[n]))
+ && bSigValid && bCertValid && (maSignatureManager.mxStore.is() && !DocumentSignatureHelper::isOOo3_2_Signature(
+ maSignatureManager.maCurrentSignatureInformations[n])))
{
aImage = m_pSigsNotvalidatedImg->GetImage();
bAllNewSignatures &= false;
More information about the Libreoffice-commits
mailing list