Kaydet (Commit) 28fcdc4f authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst e5e461dd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment