summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2018-11-26 09:21:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-12-06 11:10:40 +0100
commite5871345dbf77bd09df6dd7bd201d3f9e84e2390 (patch)
tree49d8ab26d4e713e335a2ac0c386295a104769e8b /xmlsecurity
parent41f19175c2e4c344c582c8b57a803f5ec4e5aaad (diff)
sfx2: show partial signatures even if cert validation fails
(cherry picked from commit 4a59a8aba8c9d451edff790d9281d0095c1bd78e) Conflicts: xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd Reviewed-on: https://gerrit.libreoffice.org/64174 Tested-by: Jenkins Reviewed-by: Sophie Gautier <gautier.sophie@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index cf3adf2ad42c..6b124654a292 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -488,13 +488,14 @@ void SigningTest::testOOXMLPartial()
SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
CPPUNIT_ASSERT(pObjectShell);
// This was SignatureState::BROKEN due to missing RelationshipTransform and SHA-256 support.
- // We expect NOTVALIDATED in case the root CA is not imported on the system, and PARTIAL_OK otherwise, so accept both.
+ // We expect NOTVALIDATED_PARTIAL_OK in case the root CA is not imported on the system, and PARTIAL_OK otherwise, so accept both.
+ // But reject NOTVALIDATED, hiding incompleteness is not OK.
SignatureState nActual = pObjectShell->GetDocumentSignatureState();
CPPUNIT_ASSERT_MESSAGE(
(OString::number(
static_cast<std::underlying_type<SignatureState>::type>(nActual))
.getStr()),
- (nActual == SignatureState::NOTVALIDATED
+ (nActual == SignatureState::NOTVALIDATED_PARTIAL_OK
|| nActual == SignatureState::PARTIAL_OK));
}