diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-12-24 15:11:30 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-12-24 23:03:02 +0100 |
commit | 49fcd3bbb30f93763fc5cb80fa6ac5cec5d00834 (patch) | |
tree | be6935b5f4bd69f8380b5a8a147cc09d4b543a8d /desktop | |
parent | 97b4c632e6ed1cf3cc3aa679c02a16d8398bd2ab (diff) |
Fix signing empty Configurations2/accelerator/current.xml
When determining if a file is an XML file for siging, we need to
read the manifest file to get an accurate detection. In case when
we were signing in the GUI the manifest file was read when the
storage was set. When we didn't sign over the GUI, the manifest
was never read: the code was only present in the GUI code -
"documentsignaturesdialog.cxx" so the detection was wrong and
isXML returned "true" for current.xml.
With this we move the manifest reading to DigitalSignatureManager,
where the manifest is read when needed.
Change-Id: If45a32af6410bc5f7c5afdb976b182bd69ab7d6b
Reviewed-on: https://gerrit.libreoffice.org/65600
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'desktop')
-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 e7694905747e..a934ac5cc982 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2372,6 +2372,9 @@ void DesktopLOKTest::testInsertCertificate() CPPUNIT_ASSERT(bResult); } + int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); + CPPUNIT_ASSERT_EQUAL(int(1), nState); + comphelper::LibreOfficeKit::setActive(false); } @@ -2458,6 +2461,9 @@ void DesktopLOKTest::testInsertCertificatePEM() CPPUNIT_ASSERT(bResult); } + int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument); + CPPUNIT_ASSERT_EQUAL(int(1), nState); + comphelper::LibreOfficeKit::setActive(false); } |