diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-07-13 17:51:49 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-07-14 01:58:11 +0200 |
commit | f7eff4319be741143f6d8d5e0f2995e3ce46b126 (patch) | |
tree | 132666ce29dfe9eb6737817cc5c26f258766e11e /desktop/qa | |
parent | 0e3035a7049291b9390105cfa00730ab79b07548 (diff) |
CppunitTest_desktop_lib: handle SignatureState::OK after loading
The purpose of DesktopLOKTest::testGetSignatureState_Signed() is to make
sure that in case we don't trust a cert and we add the necessary CAs,
then we trust the cert.
So just return early when we trust the cert already, it's not an
interesting failure.
Change-Id: I32f24b5464a0e14156292de2acda562025ded73f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98673
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop/qa')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 4eeb728599b7..5b6947f93eaf 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2411,6 +2411,12 @@ void DesktopLOKTest::testGetSignatureState_Signed() Scheduler::ProcessEventsToIdle(); pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}"); int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); + if (nState == 1) + { + // Already SignatureState::OK, then can't test the effect of trusting new CAs. + return; + } + CPPUNIT_ASSERT_EQUAL(int(4), nState); std::vector<unsigned char> aCertificate; |