From 4a59a8aba8c9d451edff790d9281d0095c1bd78e Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 26 Nov 2018 09:21:18 +0100 Subject: sfx2: show partial signatures even if cert validation fails Change-Id: I6060b7130827346ac5d6955bf38ebe3b476819fd Reviewed-on: https://gerrit.libreoffice.org/64022 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- xmlsecurity/qa/unit/signing/signing.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xmlsecurity/qa') 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::type>(nActual)) .getStr()), - (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::PARTIAL_OK)); + (nActual == SignatureState::NOTVALIDATED_PARTIAL_OK + || nActual == SignatureState::PARTIAL_OK)); } void SigningTest::testOOXMLBroken() -- cgit