summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2018-11-26 09:21:18 +0100
committerMiklos Vajna <vmiklos@collabora.com>2018-11-28 13:42:20 +0100
commit4e9258e033d17b9f05df36026ca573aa6b229823 (patch)
tree365801c61f0767e8baa80134355dfbdc75c7e30a /xmlsecurity
parentce7bb69f8205bcbe36cba4c53bd110e07ef3e05d (diff)
sfx2: show partial signatures even if cert validation fails
(cherry picked from commit 4a59a8aba8c9d451edff790d9281d0095c1bd78e) Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd Reviewed-on: https://gerrit.libreoffice.org/64151 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 411cfceecf82..d9507982486b 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -639,12 +639,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::PARTIAL_OK));
+ (nActual == SignatureState::NOTVALIDATED_PARTIAL_OK
+ || nActual == SignatureState::PARTIAL_OK));
}
void SigningTest::testOOXMLBroken()