1. 08 Kas, 2018 40 kayıt (commit)
    • Tor Lillqvist's avatar
      No updateSettings() in AquaSalGraphics · 237042b8
      Tor Lillqvist yazdı
      Just ifdef out the call of it for now. This is a temporary solution,
      we presumably do want dialogs to be "themed" appropriately for the iOS
      app.
      
      Change-Id: I0b14bd59ecc13037c9ff2a286405a5020081f1d5
      Reviewed-on: https://gerrit.libreoffice.org/63112Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
      Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
      237042b8
    • Tor Lillqvist's avatar
      Don't build the CustomWidgetDraw code for iOS for now · 5d74784f
      Tor Lillqvist yazdı
      Change-Id: I91a263aa68b8f84d975d42b2b48f858137370986
      Reviewed-on: https://gerrit.libreoffice.org/63111Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
      Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
      5d74784f
    • Miklos Vajna's avatar
      Revert "CppunitTest_desktop_lib: disable failing test" · 0c6be604
      Miklos Vajna yazdı
      This reverts commit 6c7e262f, now that I
      found the missing backport.
      0c6be604
    • Miklos Vajna's avatar
      libxmlsec: drop not needed xmlsec1-customkeymanage.patch.1 · 5ff7ab89
      Miklos Vajna yazdı
      This was added in commit ebd1b95b
      (INTEGRATION: CWS xmlsec08 (1.1.2); FILE ADDED; 2005-03-10) without any
      real commit message to explain why this is necessary.
      
      system-xmlsec (not containing this patch) works fine for our XML signing
      purposes with software certificates, and just recently I learned that
      even hardware-based certificates work fine without this patch, so it can
      go away.
      
      I assume this was a refactor to allow some new feature as a next step,
      but that feature was never implemented.
      
      Reviewed-on: https://gerrit.libreoffice.org/55296Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
      (cherry picked from commit f06004c0)
      
      Conflicts:
      	external/xmlsec/UnpackedTarball_xmlsec.mk
      
      Change-Id: I31639230483cd34b14b35fd41b4fcd8284476138
      5ff7ab89
    • Miklos Vajna's avatar
      CppunitTest_desktop_lib: disable failing test · 6c7e262f
      Miklos Vajna yazdı
      Until I find out why that happens.
      
      Change-Id: Ie10e402d29280b1a770dbc86cfa794645851fb05
      6c7e262f
    • Tomaž Vajngerl's avatar
      lok: send signature status on document load · 779e530d
      Tomaž Vajngerl yazdı
      Change-Id: If164d0edc9343b1db5ee96a2da46c9436ddbc73f
      Reviewed-on: https://gerrit.libreoffice.org/62776
      Tested-by: Jenkins
      Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
      (cherry picked from commit 30bb64dc)
      779e530d
    • Tomaž Vajngerl's avatar
      lok: trigger sign. verification in getSignatureState + update test · b97f3988
      Tomaž Vajngerl yazdı
      As the certificate chain can be added after the document was
      opened, we need to trigger signature verification every time the
      LOK API method getSignatureState is called.
      
      In addition update the tests so that they check the status of a
      document that's not signed, a document that was signed but the
      certificate chain is not available so the verification fails and
      later adding the certificate chain and the verification returns
      an OK status.
      
      Change-Id: I44578d0cece5bfc4a2e43fbbcd68b5ea1ccbc38b
      Reviewed-on: https://gerrit.libreoffice.org/62276
      Tested-by: Jenkins
      Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
      (cherry picked from commit 28a698db)
      b97f3988
    • Tomaž Vajngerl's avatar
      sfx2: add RecheckSignature to run signature verification again · e9b8daaa
      Tomaž Vajngerl yazdı
      This was extracted from AfterSigning method and is needed when
      we add the certificate chain to the database after the document
      was loaded already.
      
      Reviewed-on: https://gerrit.libreoffice.org/62275
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit fcdc8178)
      
      Conflicts:
      	include/sfx2/objsh.hxx
      
      Change-Id: I3087386d0131ce962eb3b588c409542617eb7bfe
      e9b8daaa
    • Tomaž Vajngerl's avatar
      lok: update the test for singing the document from LOK · ba4962fd
      Tomaž Vajngerl yazdı
      Change-Id: Ie34d8c26bfbf4192cd2067c8315030903edb3fb3
      Reviewed-on: https://gerrit.libreoffice.org/62274
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit ab7fabd8)
      ba4962fd
    • Stephan Bergmann's avatar
      xmlSecNssPKIAdoptKey apparently takes over ownership of keys · a34f1c38
      Stephan Bergmann yazdı
      (e.g., see xmlSecNssPKIKeyDataAdoptKey called from xmlSecNssPKIAdoptKey in
      workdir/UnpackedTarball/xmlsec/src/nss/pkikeys.c, which has
      
          if (ctx->privkey) {
              SECKEY_DestroyPrivateKey(ctx->privkey);
          }
          ctx->privkey = privkey;
      
      to install the passed in new privkey as ctx->privkey, which is apparently
      considered owned by ctx)
      
      Presumably since ab7fabd8 "lok: update the test
      for singing the document from LOK" changed the relevant test code,
      CppunitTest_desktop_lib fails in ASan builds with
      
      > ==16681==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d001a914a8 at pc 0x7f2af9afdf33 bp 0x7ffd59d3ccb0 sp 0x7ffd59d3cca8
      > READ of size 4 at 0x61d001a914a8 thread T0
      >  #0 in SECKEY_GetPrivateKeyType at workdir/UnpackedTarball/nss/nss/lib/cryptohi/seckey.c:1716:21 (instdir/program/libnss3.so +0x3c6f32)
      >  #1 in xmlSecNssPKIAdoptKey at workdir/UnpackedTarball/xmlsec/src/nss/pkikeys.c:208:19 (instdir/program/libxsec_xmlsec.so +0x4026bc)
      >  #2 in SecurityEnvironment_NssImpl::createKeysManager() at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:846:41 (instdir/program/libxsec_xmlsec.so +0x36a4ce)
      >  #3 in XMLSignature_NssImpl::validate(com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSignatureTemplate> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> const&) at xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx:231:56 (instdir/program/libxsec_xmlsec.so +0x3ca23e)
      >  #4 in non-virtual thunk to XMLSignature_NssImpl::validate(com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSignatureTemplate> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> const&) at xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx (instdir/program/libxsec_xmlsec.so +0x3cb1ca)
      >  #5 in SignatureVerifierImpl::startEngine(rtl::Reference<XMLSignatureTemplateImpl> const&) at xmlsecurity/source/framework/signatureverifierimpl.cxx:70:44 (instdir/program/libxmlsecurity.so +0x6da8a9)
      >  #6 in SignatureEngine::tryToPerform() at xmlsecurity/source/framework/signatureengine.cxx:112:9 (instdir/program/libxmlsecurity.so +0x6c9a4e)
      >  #7 in SecurityEngine::referenceResolved(int) at xmlsecurity/source/framework/securityengine.cxx:39:5 (instdir/program/libxmlsecurity.so +0x6ba84a)
      >  #8 in ElementCollector::doNotify() at xmlsecurity/source/framework/elementcollector.cxx:136:39 (instdir/program/libxmlsecurity.so +0x660853)
      >  #9 in ElementCollector::notifyListener() at xmlsecurity/source/framework/elementcollector.cxx:88:5 (instdir/program/libxmlsecurity.so +0x660006)
      >  #10 in BufferNode::elementCollectorNotify() at xmlsecurity/source/framework/buffernode.cxx:725:40 (instdir/program/libxmlsecurity.so +0x5fe591)
      >  #11 in BufferNode::setReceivedAll() at xmlsecurity/source/framework/buffernode.cxx:96:5 (instdir/program/libxmlsecurity.so +0x5fd61a)
      >  #12 in SAXEventKeeperImpl::endElement(rtl::OUString const&) at xmlsecurity/source/framework/saxeventkeeperimpl.cxx:1067:36 (instdir/program/libxmlsecurity.so +0x67694c)
      >  #13 in XSecParser::endElement(rtl::OUString const&) at xmlsecurity/source/helper/xsecparser.cxx:408:29 (instdir/program/libxmlsecurity.so +0x885bd6)
      >  #14 in (anonymous namespace)::SaxExpatParser_Impl::callbackEndElement(void*, char const*) at sax/source/expatwrap/sax_expat.cxx:731:9 (instdir/program/libexpwraplo.so +0x1a0817)
      >  #15 in (anonymous namespace)::call_callbackEndElement(void*, char const*) at sax/source/expatwrap/sax_expat.cxx:242:9 (instdir/program/libexpwraplo.so +0x199604)
      >  #16 in doContent at workdir/UnpackedTarball/expat/lib/xmlparse.c:2954:11 (instdir/program/libexpwraplo.so +0x32fdf9)
      >  #17 in contentProcessor at workdir/UnpackedTarball/expat/lib/xmlparse.c:2531:27 (instdir/program/libexpwraplo.so +0x319c93)
      >  #18 in doProlog at workdir/UnpackedTarball/expat/lib/xmlparse.c:4556:14 (instdir/program/libexpwraplo.so +0x313539)
      >  #19 in prologProcessor at workdir/UnpackedTarball/expat/lib/xmlparse.c:4270:10 (instdir/program/libexpwraplo.so +0x2ffcc8)
      >  #20 in XML_ParseBuffer at workdir/UnpackedTarball/expat/lib/xmlparse.c:1983:25 (instdir/program/libexpwraplo.so +0x2fafbf)
      >  #21 in (anonymous namespace)::SaxExpatParser_Impl::parse() at sax/source/expatwrap/sax_expat.cxx:654:27 (instdir/program/libexpwraplo.so +0x19a27e)
      >  #22 in (anonymous namespace)::SaxExpatParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/expatwrap/sax_expat.cxx:484:14 (instdir/program/libexpwraplo.so +0x192774)
      >  #23 in XMLSignatureHelper::ReadAndVerifySignature(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&) at xmlsecurity/source/helper/xmlsignaturehelper.cxx:278:18 (instdir/program/libxmlsecurity.so +0x7dd825)
      >  #24 in DocumentSignatureManager::read(bool, bool) at xmlsecurity/source/helper/documentsignaturemanager.cxx:549:31 (instdir/program/libxmlsecurity.so +0x743aaa)
      >  #25 in DocumentDigitalSignatures::signDocumentWithCertificate(com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at xmlsecurity/source/component/documentdigitalsignatures.cxx:781:23 (instdir/program/libxmlsecurity.so +0x4855fc)
      >  #26 in SfxMedium::SignDocumentContentUsingCertificate(bool, com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&) at sfx2/source/doc/docfile.cxx:3709:42 (instdir/program/libsfxlo.so +0x3577abe)
      >  #27 in SfxObjectShell::SignDocumentContentUsingCertificate(com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&) at sfx2/source/doc/objserv.cxx:1659:38 (instdir/program/libsfxlo.so +0x37e1aab)
      >  #28 in doc_insertCertificate(_LibreOfficeKitDocument*, unsigned char const*, int, unsigned char const*, int) at desktop/source/lib/init.cxx:3690:26 (instdir/program/libsofficeapp.so +0x7a40af)
      >  #29 in DesktopLOKTest::testInsertCertificate() at desktop/qa/desktop_lib/test_desktop_lib.cxx:2322:24 (workdir/LinkTarget/CppunitTest/libtest_desktop_lib.so +0x187439)
      >
      > 0x61d001a914a8 is located 40 bytes inside of 2048-byte region [0x61d001a91480,0x61d001a91c80)
      > freed by thread T0 here:
      >  #0 in free at /home/sbergman/github.com/llvm-project/llvm-project-20170507/compiler-rt/lib/asan/asan_malloc_linux.cc:124:3 (workdir/LinkTarget/Executable/cppunittester +0x4feda8)
      >  #1 in PR_Free at workdir/UnpackedTarball/nss/nspr/out/pr/src/malloc/../../../../pr/src/malloc/prmem.c:458:9 (instdir/program/libnspr4.so +0x12c5af)
      >  #2 in FreeArenaList at workdir/UnpackedTarball/nss/nspr/out/lib/ds/../../../lib/ds/plarena.c:195:9 (instdir/program/libplds4.so +0xcc36)
      >  #3 in PL_FreeArenaPool at workdir/UnpackedTarball/nss/nspr/out/lib/ds/../../../lib/ds/plarena.c:216:5 (instdir/program/libplds4.so +0xcd9d)
      >  #4 in PORT_FreeArena_Util at workdir/UnpackedTarball/nss/nss/lib/util/secport.c:383:9 (instdir/program/libnssutil3.so +0x103381)
      >  #5 in SECKEY_DestroyPrivateKey at workdir/UnpackedTarball/nss/nss/lib/cryptohi/seckey.c:250:13 (instdir/program/libnss3.so +0x3baa05)
      >  #6 in xmlSecNSSPKIKeyDataCtxFree at workdir/UnpackedTarball/xmlsec/src/nss/pkikeys.c:109:9 (instdir/program/libxsec_xmlsec.so +0x4093a3)
      >  #7 in xmlSecNssPKIKeyDataFinalize at workdir/UnpackedTarball/xmlsec/src/nss/pkikeys.c:99:5 (instdir/program/libxsec_xmlsec.so +0x417a61)
      >  #8 in xmlSecNssKeyDataRsaFinalize at workdir/UnpackedTarball/xmlsec/src/nss/pkikeys.c:1086:5 (instdir/program/libxsec_xmlsec.so +0x419214)
      >  #9 in xmlSecKeyDataDestroy at workdir/UnpackedTarball/xmlsec/src/keysdata.c:248:9 (instdir/program/libxsec_xmlsec.so +0x5213f4)
      >  #10 in xmlSecKeyEmpty at workdir/UnpackedTarball/xmlsec/src/keys.c:533:9 (instdir/program/libxsec_xmlsec.so +0x518026)
      >  #11 in xmlSecKeyDestroy at workdir/UnpackedTarball/xmlsec/src/keys.c:555:5 (instdir/program/libxsec_xmlsec.so +0x51838a)
      >  #12 in xmlSecPtrListEmpty at workdir/UnpackedTarball/xmlsec/src/list.c:149:17 (instdir/program/libxsec_xmlsec.so +0x54943a)
      >  #13 in xmlSecPtrListFinalize at workdir/UnpackedTarball/xmlsec/src/list.c:129:5 (instdir/program/libxsec_xmlsec.so +0x548b87)
      >  #14 in xmlSecSimpleKeysStoreFinalize at workdir/UnpackedTarball/xmlsec/src/keysmngr.c:663:5 (instdir/program/libxsec_xmlsec.so +0x5432b0)
      >  #15 in xmlSecKeyStoreDestroy at workdir/UnpackedTarball/xmlsec/src/keysmngr.c:274:9 (instdir/program/libxsec_xmlsec.so +0x53a03c)
      >  #16 in xmlSecNssKeysStoreFinalize at workdir/UnpackedTarball/xmlsec/src/nss/keysstore.c:276:5 (instdir/program/libxsec_xmlsec.so +0x485f76)
      >  #17 in xmlSecKeyStoreDestroy at workdir/UnpackedTarball/xmlsec/src/keysmngr.c:274:9 (instdir/program/libxsec_xmlsec.so +0x53a03c)
      >  #18 in xmlSecKeysMngrDestroy at workdir/UnpackedTarball/xmlsec/src/keysmngr.c:84:9 (instdir/program/libxsec_xmlsec.so +0x539a79)
      >  #19 in SecurityEnvironment_NssImpl::destroyKeysManager(_xmlSecKeysMngr*) at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:862:9 (instdir/program/libxsec_xmlsec.so +0x36a817)
      >  #20 in std::default_delete<_xmlSecKeysMngr>::operator()(_xmlSecKeysMngr*) at xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx:52:46 (instdir/program/libxsec_xmlsec.so +0x3cd05d)
      >  #21 in std::unique_ptr<_xmlSecKeysMngr, std::default_delete<_xmlSecKeysMngr> >::~unique_ptr() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/unique_ptr.h:274:4 (instdir/program/libxsec_xmlsec.so +0x3cc759)
      >  #22 in XMLSignature_NssImpl::generate(com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSignatureTemplate> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::XSecurityEnvironment> const&) at xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx:173:1 (instdir/program/libxsec_xmlsec.so +0x3c8934)
      >  #23 in non-virtual thunk to XMLSignature_NssImpl::generate(com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSignatureTemplate> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::XSecurityEnvironment> const&) at xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx (instdir/program/libxsec_xmlsec.so +0x3c8b9a)
      >  #24 in SignatureCreatorImpl::startEngine(rtl::Reference<XMLSignatureTemplateImpl> const&) at xmlsecurity/source/framework/signaturecreatorimpl.cxx:78:44 (instdir/program/libxmlsecurity.so +0x6be738)
      >  #25 in SignatureEngine::tryToPerform() at xmlsecurity/source/framework/signatureengine.cxx:112:9 (instdir/program/libxmlsecurity.so +0x6c9a4e)
      >  #26 in SecurityEngine::referenceResolved(int) at xmlsecurity/source/framework/securityengine.cxx:39:5 (instdir/program/libxmlsecurity.so +0x6ba84a)
      >  #27 in ElementCollector::doNotify() at xmlsecurity/source/framework/elementcollector.cxx:136:39 (instdir/program/libxmlsecurity.so +0x660853)
      >  #28 in ElementCollector::notifyListener() at xmlsecurity/source/framework/elementcollector.cxx:88:5 (instdir/program/libxmlsecurity.so +0x660006)
      >  #29 in BufferNode::elementCollectorNotify() at xmlsecurity/source/framework/buffernode.cxx:725:40 (instdir/program/libxmlsecurity.so +0x5fe591)
      >  #30 in BufferNode::setReceivedAll() at xmlsecurity/source/framework/buffernode.cxx:96:5 (instdir/program/libxmlsecurity.so +0x5fd61a)
      >  #31 in SAXEventKeeperImpl::endElement(rtl::OUString const&) at xmlsecurity/source/framework/saxeventkeeperimpl.cxx:1067:36 (instdir/program/libxmlsecurity.so +0x67694c)
      >  #32 in XSecController::exportSignature(com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, SignatureInformation const&, bool) at xmlsecurity/source/helper/xsecctl.cxx:916:23 (instdir/program/libxmlsecurity.so +0x868894)
      >  #33 in XSecController::WriteSignature(com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, bool) at xmlsecurity/source/helper/xsecsign.cxx:393:17 (instdir/program/libxmlsecurity.so +0x894df1)
      >  #34 in XMLSignatureHelper::CreateAndWriteSignature(com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, bool) at xmlsecurity/source/helper/xmlsignaturehelper.cxx:248:29 (instdir/program/libxmlsecurity.so +0x7dcebe)
      >  #35 in DocumentSignatureManager::add(com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> const&, rtl::OUString const&, int&, bool, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> const&, com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> const&) at xmlsecurity/source/helper/documentsignaturemanager.cxx:422:27 (instdir/program/libxmlsecurity.so +0x74032e)
      >  #36 in DocumentDigitalSignatures::signDocumentWithCertificate(com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::io::XStream> const&) at xmlsecurity/source/component/documentdigitalsignatures.cxx:777:39 (instdir/program/libxmlsecurity.so +0x48541a)
      >  #37 in SfxMedium::SignDocumentContentUsingCertificate(bool, com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&) at sfx2/source/doc/docfile.cxx:3709:42 (instdir/program/libsfxlo.so +0x3577abe)
      >  #38 in SfxObjectShell::SignDocumentContentUsingCertificate(com::sun::star::uno::Reference<com::sun::star::security::XCertificate> const&) at sfx2/source/doc/objserv.cxx:1659:38 (instdir/program/libsfxlo.so +0x37e1aab)
      >  #39 in doc_insertCertificate(_LibreOfficeKitDocument*, unsigned char const*, int, unsigned char const*, int) at desktop/source/lib/init.cxx:3690:26 (instdir/program/libsofficeapp.so +0x7a40af)
      >  #40 in DesktopLOKTest::testInsertCertificate() at desktop/qa/desktop_lib/test_desktop_lib.cxx:2322:24 (workdir/LinkTarget/CppunitTest/libtest_desktop_lib.so +0x187439)
      >
      > previously allocated by thread T0 here:
      >  #0 in __interceptor_malloc at /home/sbergman/github.com/llvm-project/llvm-project-20170507/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3 (workdir/LinkTarget/Executable/cppunittester +0x4ff187)
      >  #1 in PR_Malloc at workdir/UnpackedTarball/nss/nspr/out/pr/src/malloc/../../../../pr/src/malloc/prmem.c:435:55 (instdir/program/libnspr4.so +0x12892c)
      >  #2 in PL_ArenaAllocate at workdir/UnpackedTarball/nss/nspr/out/lib/ds/../../../lib/ds/plarena.c:127:27 (instdir/program/libplds4.so +0x9c8f)
      >  #3 in PORT_ArenaAlloc_Util at workdir/UnpackedTarball/nss/nss/lib/util/secport.c:321:9 (instdir/program/libnssutil3.so +0x1028c3)
      >  #4 in PORT_ArenaZAlloc_Util at workdir/UnpackedTarball/nss/nss/lib/util/secport.c:342:9 (instdir/program/libnssutil3.so +0x10311f)
      >  #5 in PK11_MakePrivKey at workdir/UnpackedTarball/nss/nss/lib/pk11wrap/pk11akey.c:865:9 (instdir/program/libnss3.so +0x3f6529)
      >  #6 in PK11_ImportAndReturnPrivateKey at workdir/UnpackedTarball/nss/nss/lib/pk11wrap/pk11pk12.c:538:18 (instdir/program/libnss3.so +0x4ebcac)
      >  #7 in PK11_ImportPrivateKeyInfoAndReturnKey at workdir/UnpackedTarball/nss/nss/lib/pk11wrap/pk11pk12.c:645:10 (instdir/program/libnss3.so +0x4dea0c)
      >  #8 in PK11_ImportDERPrivateKeyInfoAndReturnKey at workdir/UnpackedTarball/nss/nss/lib/pk11wrap/pk11pk12.c:299:10 (instdir/program/libnss3.so +0x4ddba8)
      >  #9 in SecurityEnvironment_NssImpl::insertPrivateKey(com::sun::star::uno::Sequence<signed char> const&) at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:883:25 (instdir/program/libxsec_xmlsec.so +0x36ac38)
      >  #10 in SecurityEnvironment_NssImpl::createDERCertificateWithPrivateKey(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::uno::Sequence<signed char> const&) at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:897:37 (instdir/program/libxsec_xmlsec.so +0x36afe6)
      >  #11 in non-virtual thunk to SecurityEnvironment_NssImpl::createDERCertificateWithPrivateKey(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::uno::Sequence<signed char> const&) at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx (instdir/program/libxsec_xmlsec.so +0x36b49a)
      >  #12 in doc_insertCertificate(_LibreOfficeKitDocument*, unsigned char const*, int, unsigned char const*, int) at desktop/source/lib/init.cxx:3685:41 (instdir/program/libsofficeapp.so +0x7a3ea3)
      >  #13 in DesktopLOKTest::testInsertCertificate() at desktop/qa/desktop_lib/test_desktop_lib.cxx:2322:24 (workdir/LinkTarget/CppunitTest/libtest_desktop_lib.so +0x187439)
      
      Change-Id: Id54bdea78affbf3aa24a1e9bb565c46f48f512e6
      Reviewed-on: https://gerrit.libreoffice.org/62914
      Tested-by: Jenkins
      Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
      (cherry picked from commit 23874f86)
      a34f1c38
    • Tomaž Vajngerl's avatar
      lok: new function to add certificate to certificate DB · 7cfec914
      Tomaž Vajngerl yazdı
      Also needed to extend XCertificateCreator with a new method
      "addDERCertificateToTheDatabase".
      
      Reviewed-on: https://gerrit.libreoffice.org/62273
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 08c3c504)
      
      Conflicts:
      	desktop/qa/desktop_lib/test_desktop_lib.cxx
      	xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
      
      Change-Id: I7b4df65365893bd5a0628aeec30b3156584849fe
      7cfec914
    • Tomaž Vajngerl's avatar
      lok: Get the object shell from the document · 81400dcc
      Tomaž Vajngerl yazdı
      Change-Id: Id62c0db3c9f404aaab70de0a73a20b2bb57b0393
      Reviewed-on: https://gerrit.libreoffice.org/62272
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 15018316)
      81400dcc
    • Tomaž Vajngerl's avatar
      fix importing the certificate and private key · 025d881e
      Tomaž Vajngerl yazdı
      If importing the certificate and private key is done separately,
      they don't associate with each other, so with this you can add
      the private key to the certificate that it belongs to. If the
      private key is set in this way, then getPrivateKey() call doesn't
      look into the database but just returns the private key stored
      in the member variable.
      
      Additionally use CERT_DecodeCertFromPackage to import the DER
      certificate from the imput as CERT_DecodeDERCertificate doesn't
      import a complete certificate and doesn't add it into the
      certificate database.
      
      Change-Id: I29876030f167cc5fa6b887f9bfeb0b84622c751e
      Reviewed-on: https://gerrit.libreoffice.org/62271
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 2286137c)
      025d881e
    • Tomaž Vajngerl's avatar
      lok: create certificate and private key with insertCertificate · 3e57de91
      Tomaž Vajngerl yazdı
      Change-Id: Ie114068d9aec5259f9f7ed395c5dfeecf8bb787d
      Reviewed-on: https://gerrit.libreoffice.org/61915
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit c2ceb1f5)
      3e57de91
    • Tomaž Vajngerl's avatar
      xmlsecurity: implement XCertificateCreator for NSS backend · 38cb72b3
      Tomaž Vajngerl yazdı
      Reviewed-on: https://gerrit.libreoffice.org/61914
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit ef2623b7)
      
      Conflicts:
      	xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
      
      Change-Id: I28aa17e6c97494769185ed289836524064030f39
      38cb72b3
    • Tomaž Vajngerl's avatar
      xmlsignaturehelper: fix comments, no change · 728718b0
      Tomaž Vajngerl yazdı
      Change-Id: Ibfdf92712264ad37aafed53db0fe8e8c4fea4699
      Reviewed-on: https://gerrit.libreoffice.org/61913
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit a113aff7)
      728718b0
    • Tomaž Vajngerl's avatar
      xmlsecurity: UNO interface to create cert. and private key · db4b4bdf
      Tomaž Vajngerl yazdı
      new XCertificateCreator interface which can be used to create a
      certificate and a associated private key, both in DER format
      
      Change-Id: I24caf053f1f2b7357a836047b88b4ce418470eac
      Reviewed-on: https://gerrit.libreoffice.org/61912
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit bdde44d5)
      db4b4bdf
    • Tomaž Vajngerl's avatar
      lokit: test for the new signing API functions · 0a294a20
      Tomaž Vajngerl yazdı
      Reviewed-on: https://gerrit.libreoffice.org/61782
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit d2242cb1)
      
      Conflicts:
      	desktop/CppunitTest_desktop_lib.mk
      
      Change-Id: I3ab2f3986955eb82451704fc2386b64f208da554
      0a294a20
    • Tomaž Vajngerl's avatar
      xmlsecurity: prevent seg. fault if there is no private key · 641f7123
      Tomaž Vajngerl yazdı
      Change-Id: I8c6917c63bbdcf0d9bb2eb1c89745186feb263f8
      Reviewed-on: https://gerrit.libreoffice.org/61781Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 2077c5e4)
      641f7123
    • Tomaž Vajngerl's avatar
      lokit: add funct. to insert, sign and verify signature · 11394fd7
      Tomaž Vajngerl yazdı
      A lot of signing code paths trigger a GUI dialog (to select the
      certificate for example) which aren't acceptable when triggering
      through the LOKit. This code paths needed to be duplicated and
      reworked to not trigger any GUI action.
      
      Reviewed-on: https://gerrit.libreoffice.org/61780
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 23a23123)
      
      Conflicts:
      	desktop/qa/desktop_lib/test_desktop_lib.cxx
      	include/LibreOfficeKit/LibreOfficeKit.hxx
      	include/sfx2/objsh.hxx
      	sfx2/source/doc/docfile.cxx
      	sfx2/source/doc/objserv.cxx
      
      Change-Id: I2f0d6038fb1bcd00adcdf86e432f9df8858cc21c
      11394fd7
    • Caolán McNamara's avatar
      coverity#1338604 Uninitialized scalar field · 32b4b5af
      Caolán McNamara yazdı
      Change-Id: I4c4c07db527ea2517ed809f693bde4af519e503e
      Reviewed-on: https://gerrit.libreoffice.org/54582Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      (cherry picked from commit 892306b5)
      32b4b5af
    • Samuel Mehrbrodt's avatar
      Refactor SfxObjectShell sign methods · a266cfa7
      Samuel Mehrbrodt yazdı
      for signature line signing
      
      Reviewed-on: https://gerrit.libreoffice.org/54473Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
      (cherry picked from commit 0ca16593)
      
      Conflicts:
      	cui/source/dialogs/SignSignatureLineDialog.cxx
      	sfx2/source/doc/objserv.cxx
      
      Change-Id: Iac4f3a248af53bdbf159e6e8d656e1dcbc3aacbf
      a266cfa7
    • Samuel Mehrbrodt's avatar
      tdf#83877 Write SignatureLineId to ODF & OOXML signatures · f6c5c8b1
      Samuel Mehrbrodt yazdı
      Reviewed-on: https://gerrit.libreoffice.org/54432Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
      (cherry picked from commit 201321f6)
      
      Conflicts:
      	cui/source/dialogs/SignSignatureLineDialog.cxx
      	xmlsecurity/source/component/documentdigitalsignatures.cxx
      	xmlsecurity/source/helper/documentsignaturemanager.cxx
      
      Change-Id: I483a3b7895cdcb10ef9d6dacf167ed0f8db7e723
      f6c5c8b1
    • Samuel Mehrbrodt's avatar
      Sign Signature Line · a797afa5
      Samuel Mehrbrodt yazdı
      This adds a new context menu entry "Sign Signature Line" to signature lines.
      You can directly sign the document from there.
      
      Still missing is the updating of the graphic to reflect the valid/invalid
      signature state.
      
      Reviewed-on: https://gerrit.libreoffice.org/53778Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
      (cherry picked from commit 86e8cfdd)
      
      Conflicts:
      	cui/source/dialogs/SignSignatureLineDialog.cxx
      	xmlsecurity/source/component/documentdigitalsignatures.cxx
      
      Change-Id: Ib8bc8c57f9d5370a10e379f86f9e41e57c715e3f
      a797afa5
    • Tomaž Vajngerl's avatar
      use "range for" to iterate through certificates · 1ed7d2fe
      Tomaž Vajngerl yazdı
      Reviewed-on: https://gerrit.libreoffice.org/61779
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit f9acea52)
      
      Conflicts:
      	xmlsecurity/source/helper/documentsignaturemanager.cxx
      
      Change-Id: Ife206ab29f2f8eaa2358f45e6bae2290d95fd4d6
      1ed7d2fe
    • Tomaž Vajngerl's avatar
      Support to sign a document with a specified signature · cc145029
      Tomaž Vajngerl yazdı
      Reviewed-on: https://gerrit.libreoffice.org/61778
      Tested-by: Jenkins
      Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
      (cherry picked from commit 40810c43)
      
      Conflicts:
      	xmlsecurity/source/component/documentdigitalsignatures.cxx
      
      Change-Id: I92e392b315c9217b63db830dea1b2e91387b56c2
      cc145029
    • Ashod Nakashian's avatar
      LOK: custom widgets: simplify and correct colors · 09293ff5
      Ashod Nakashian yazdı
      Also remove macroni.
      
      Change-Id: I0b2914e9f0e2aba9d8ca10338b515b598126e315
      09293ff5
    • Ashod Nakashian's avatar
      LOK: custom widgets: reduce theme plugin API surface · 70d4b1f1
      Ashod Nakashian yazdı
      Change-Id: I89dcf5a102be19fd1bc314a89538a121522f4a43
      70d4b1f1
    • Ashod Nakashian's avatar
      LOK: custom widgets: reduce Color into an int to reduce API surface · bf451702
      Ashod Nakashian yazdı
      Change-Id: Ib1afbb0b5647048f24d4ea6f9859b76328568dac
      bf451702
    • Ashod Nakashian's avatar
      LOK: custom widgets: check size of API structures · f4100192
      Ashod Nakashian yazdı
      Change-Id: Iff50f7aeb471870230e9e822657deed6aefad268
      f4100192
    • Jan Holesovsky's avatar
      LOK: custom widgets: No need for SAL_DLLPUBLIC_RTTI here any more. · 438169eb
      Jan Holesovsky yazdı
      Change-Id: I7cae61e1fa9cf74b98627d557890fd41047421df
      438169eb
    • Ashod Nakashian's avatar
      LOK: custom widgets: convert WidgetThemeLibrary to POD for ABI compatibility · a66386f9
      Ashod Nakashian yazdı
      Change-Id: Ibc425d8e630460547d66723ccabeaf4ac29d2719
      a66386f9
    • Ashod Nakashian's avatar
      LOK: custom themes: isolate LO internals headers from theme plugin · efe2b74a
      Ashod Nakashian yazdı
      Change-Id: Ic189aecf092b9cffd800e410d2d6e88016c43052
      efe2b74a
    • Ashod Nakashian's avatar
      LOK: custom widgets: draw focused listbox text in highlight colors · f5044133
      Ashod Nakashian yazdı
      Change-Id: I8fc90458204d93044f7293f4bc74737debd72c23
      f5044133
    • Ashod Nakashian's avatar
      lok: custom widgets: render editbox borders · 9c5bc82f
      Ashod Nakashian yazdı
      Change-Id: I1962a4a1397363b1c15e49d57b0bbcc9c232ce30
      9c5bc82f
    • Ashod Nakashian's avatar
      custom widgets: rework colors and cleanup · e9f5fce4
      Ashod Nakashian yazdı
      Use ColorData for custom widget themes to
      make it more readable and consistent.
      
      Renamed and split out colors to be more accurately
      named and representative of how they are used.
      
      Fixed a number of inconsistencies in how colors
      were used across widgets.
      
      Change-Id: I1cbb5f19223bd55107379b049beccaf1de4e26b2
      e9f5fce4
    • Ashod Nakashian's avatar
      LOK: custom widgets: don't clobber the custom colors · a64bb41e
      Ashod Nakashian yazdı
      The old logic threw away the result of updateSettings
      by applying the styles saved and modified after calling
      it, which lost all the custom colors thereby breaking
      custom-widgets and themeing altogether.
      
      Change-Id: Ic3750f145b67cd6a379f3b628a10c213a31656e7
      a64bb41e
    • Ashod Nakashian's avatar
      LOK: custom widgets: support custom menu colors · c8ae3b1e
      Ashod Nakashian yazdı
      Change-Id: Icd6367fa40f9655cd58816461f0d2fca6f6932e2
      c8ae3b1e
    • Ashod Nakashian's avatar
      custom widgets: correct focus colors and render button-up in listboxes · ef709181
      Ashod Nakashian yazdı
      Change-Id: I70f46f94747f468a2bb79f8baa4576e4460bef31
      ef709181
    • Tomaž Vajngerl's avatar
      custom widgets: comment unused params. to avoid compile warnings · e08293b0
      Tomaž Vajngerl yazdı
      Change-Id: I45b7ffdce2d470ed2f30b5408d8d861deb00514a
      e08293b0