summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)Author
2018-01-17coverity#1427630 Unchecked return valueCaolán McNamara
Change-Id: If92d5b080ce9a4e28fe15da1448f74ecf0a31257
2018-01-16tdf#115011 don't crash on non-existent gpg supportThorsten Behrens
Change-Id: I90679472898648ccf0811c67c17f7bad41d4e347 Reviewed-on: https://gerrit.libreoffice.org/47984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-16Fix typosAndrea Gelmini
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: xmlsecurityStephan Bergmann
Change-Id: I3ff3df41b004a0c2cfe01da19c1a0aa6488aaead
2018-01-13gpg4libre: add initial unit test for encryptionThorsten Behrens
Load encrypted document w/ password-less key, don't fail. Change-Id: Id782dd865878ae7b8a60c7c80821b1370f6ac7e7 Reviewed-on: https://gerrit.libreoffice.org/47831 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-12More loplugin:cstylecast: xmlsecurityStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ica6e96072435aa4df4e74accdfe06f798a640bbe
2018-01-05xmlsecurity: remove unused xml_security::serial_number_adapterMiklos Vajna
Change-Id: I09bc10a021fb5319cc256542206d94bc00646304 Reviewed-on: https://gerrit.libreoffice.org/47402 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04tdf#42949 Fix some more Include What You Use warningsMiklos Vajna
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-03Turn on clang-format for these filesMiklos Vajna
I (tried to) keep these files consistent locally with astyle in the past, switching to clang-format makes sure that the recent problem with introducing inconsistencies with automatic loplugin rewrites doesn't happen again. Change-Id: If49c96b6e9e6ed50beb69c70e37125dff5607f76 Reviewed-on: https://gerrit.libreoffice.org/47332 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-02loplugin:passstuffbyref improved return in swNoel Grandin
Change-Id: I4484ac461761e4c46364b4f473c7e62f8ec72103 Reviewed-on: https://gerrit.libreoffice.org/47243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19Do things with preferred GPG keysKatarina Behrens
For signing, preselect the key in the list of available keys. For encryption, when 'encrypt to self' bit is set, add user's key to the list of keys to encryption. Change-Id: I5bbfd0e2cc97b76c1304a2a345a51cf83bc5949e Reviewed-on: https://gerrit.libreoffice.org/46694 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-17Fix typosAndrea Gelmini
Change-Id: Ifcbf431291cc77ffc33cc1cbcc493181ffc9943d Reviewed-on: https://gerrit.libreoffice.org/46634 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-15loplugin:salcall (clang-cl)Stephan Bergmann
Change-Id: Idda630320bb5e02e1ea675b3b3786c9ec6ac166b Reviewed-on: https://gerrit.libreoffice.org/46504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14xmlsecurity: move GNUPGHOME to $workdir for unit testThorsten Behrens
Since some GnuPG versions tend to litter the source tree with random files otherwise. Change-Id: I0302f73b216f2de4dafcb6adca81097ec9d87e8c Reviewed-on: https://gerrit.libreoffice.org/46447 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-14[API CHANGE] offapi: remove unused css.security.SerialNumberAdapterMiklos Vajna
This is mostly just the offapi/ part, more C++ code can be removed in xmlsecurity/ after this. It seems to be unlikely that this non-published service was used by 3rd-party code, since it was specific to other xmlsecurity/ code, not generic functionality that could be useful in other contexts. Change-Id: I0d798577a42445e65a4c5178fcb4464ea03bc56e Reviewed-on: https://gerrit.libreoffice.org/46442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-14Remove junk committed by mistakeStephan Bergmann
Change-Id: I029d5c949b4a1e6bd6b0ce4edb39411b9dce88c2
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-12CppunitTest_xmlsecurity_signing failed in sanitizer buildsStephan Bergmann
...because external/gpgmepp spawns /usr/bin/gpgconf (and later on /usr/bin/ggp2, /usr/bin/gpgsm) which all depend on libgpg-error.so.0, so due to CppunitTest's LD_LIBRARY_PATH will pick up instdir/program/libgpg-error.so.0, which fails due to > /usr/bin/gpgconf: symbol lookup error: /data/sbergman/lo-san/core/instdir/program/libgpg-error.so.0: undefined symbol: __asan_option_detect_stack_use_after_return The easiest fix appears to be, when running sanitizers on Linux, to hack gpgmepp's _gpgme_io_spawn to set LD_LIBRARY_PATH back to its original state. (When it was originally unset, it will now be set but null, but that should not make a difference.) This requires EXTRA_ENV_VARS to be set earlier in CppunitTest.mk, so setting LIBO_LD_PATH doesn't use the LD_LIBRARY_PATH value set in gb_CppunitTest_CPPTESTPRECOMMAND. The backtrace of the first, originally failing call to _gpgme_io_spawn during CppunitTest_xmlsecurity_signing: > #0 0x00007fffe1f354dc in _gpgme_io_spawn (path=0x1 <error: Cannot access memory at address 0x1>, argv=0x7ffff2fbd4e0, flags=0, fd_list=0x9, atfork=0x4e, atforkvalue=0x7ffff2fbd4e0, r_pid=0x7ffff2fbd4e0) at posix-io.c:433 > #1 0x00007fffe1f41971 in read_gpgconf_dirs (pgmname=0x6110002f8e00 "/usr/bin/gpgconf", components=0) at dirinfo.c:206 > #2 0x00007fffe1f3fa29 in get_gpgconf_item (what=12) at dirinfo.c:284 > #3 0x00007fffe1f4073e in _gpgme_get_default_gpg_name () at dirinfo.c:370 > #4 0x00007fffe1e87093 in engine_get_file_name (proto=GPGME_PROTOCOL_OpenPGP) at engine.c:79 > #5 0x00007fffe1e84e89 in gpgme_get_engine_info (info=0x7ffff2a06160) at engine.c:230 > #6 0x00007fffe1e845ef in gpgme_engine_check_version (proto=GPGME_PROTOCOL_OpenPGP) at engine.c:144 > #7 0x00007fffe634e7d9 in GpgME::checkEngine(GpgME::Protocol) (proto=GpgME::OpenPGP) at context.cpp:1610 > #8 0x00007fff8df3fd49 in SecurityEnvironmentGpg::SecurityEnvironmentGpg() (this=0x6060005825c0) at xmlsecurity/source/gpg/SecurityEnvironment.cxx:30 > #9 0x00007fff8df5755e in SEInitializerGpg::createSecurityContext(rtl::OUString const&) (this=0x606000582560) at xmlsecurity/source/gpg/SEInitializer.cxx:45 > #10 0x00007fff8df57bb3 in non-virtual thunk to SEInitializerGpg::createSecurityContext(rtl::OUString const&) () at include/rtl/stringutils.hxx:170 > #11 0x00007fffab66de90 in DocumentSignatureManager::init() (this=0x7ffff2fbb020) at xmlsecurity/source/helper/documentsignaturemanager.cxx:78 > #12 0x00007fffab498504 in DocumentDigitalSignatures::ImplVerifySignatures(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, DocumentSignatureMode) (this=0x6080001aaf20, rxStorage=uno::Reference to (OStorage *) 0x60d0003a4c48, xSignStream=empty uno::Reference, eMode=DocumentSignatureMode::Content) at xmlsecurity/source/component/documentdigitalsignatures.cxx:264 > #13 0x00007fffab497f8b in DocumentDigitalSignatures::verifyDocumentContentSignatures(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&) (this=0x6080001aaf20, rxStorage=uno::Reference to (OStorage *) 0x60d0003a4c48, xSignInStream=empty uno::Reference) at xmlsecurity/source/component/documentdigitalsignatures.cxx:127 > #14 0x00007fffab49c35b in non-virtual thunk to DocumentDigitalSignatures::verifyDocumentContentSignatures(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&) () at include/cppu/unotype.hxx:136 > #15 0x00007fffafc062a3 in SfxObjectShell::ImplAnalyzeSignature(bool, com::sun::star::uno::Reference<com::sun::star::security::XDocumentDigitalSignatures> const&) (this=0x61100021c7c0, bScriptingContent=false, xSigner=empty uno::Reference) at sfx2/source/doc/objserv.cxx:1293 > #16 0x00007fffafc074b1 in SfxObjectShell::ImplGetSignatureState(bool) (this=0x61100021c7c0, bScriptingContent=false) at sfx2/source/doc/objserv.cxx:1322 > #17 0x00007fffafc0383d in SfxObjectShell::GetDocumentSignatureState() (this=0x61100021c7c0) at sfx2/source/doc/objserv.cxx:1485 > #18 0x00007fffafbb323c in SfxObjectShell::CheckForBrokenDocSignatures_Impl() (this=0x61100021c7c0) at sfx2/source/doc/objmisc.cxx:981 > #19 0x00007fffafbb2da4 in SfxObjectShell::CheckSecurityOnLoading_Impl() (this=0x61100021c7c0) at sfx2/source/doc/objmisc.cxx:931 > #20 0x00007fffafbb95cf in SfxObjectShell::FinishedLoading(SfxLoadedFlags) (this=0x61100021c7c0, nFlags=SfxLoadedFlags::ALL) at sfx2/source/doc/objmisc.cxx:1079 > #21 0x00007fff716a9185 in SwDocShell::LoadingFinished() (this=0x61100021c7c0) at sw/source/uibase/app/docsh.cxx:1153 > #22 0x00007fff71759ada in SwDocShell::Load(SfxMedium&) (this=0x61100021c7c0, rMedium=...) at sw/source/uibase/app/docshini.cxx:581 > #23 0x00007fffafc2bd9a in SfxObjectShell::LoadOwnFormat(SfxMedium&) (this=0x61100021c7c0, rMedium=...) at sfx2/source/doc/objstor.cxx:2971 > #24 0x00007fffafc3128c in SfxObjectShell::DoLoad(SfxMedium*) (this=0x61100021c7c0, pMed=0x60300083dac0) at sfx2/source/doc/objstor.cxx:714 > #25 0x00007fffafdd88d8 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x6190000fb0b0, seqArguments=uno::Sequence of length 13 = {...}) at sfx2/source/doc/sfxbasemodel.cxx:1788 > #26 0x00007fffb049a98a in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (this=0x6060004aaec0, rArgs=uno::Sequence of length 11 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x6160000c63f0) at sfx2/source/view/frmload.cxx:693 > #27 0x00007fff82d6a7ee in framework::LoadEnv::impl_loadContent() (this=0x7ffff2fe3040) at framework/source/loadenv/loadenv.cxx:1105 > #28 0x00007fff82d5aa6b in framework::LoadEnv::startLoading() (this=0x7ffff2fe3040) at framework/source/loadenv/loadenv.cxx:374 > #29 0x00007fff82d56633 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (xLoader=uno::Reference to (framework::Desktop *) 0x6160000153f8, xContext=uno::Reference to (cppu::ComponentContext *) 0x611000002b10, sURL="file:///xmlsecurity/qa/unit/signing/data/goodGPG.odt", sTarget="_default", nFlags=0, lArgs=uno::Sequence of length 2 = {...}) at framework/source/loadenv/loadenv.cxx:160 > #30 0x00007fff82ec93f0 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x616000015380, sURL="file:///xmlsecurity/qa/unit/signing/data/goodGPG.odt", sTargetFrameName="_default", nSearchFlags=0, lArguments=uno::Sequence of length 2 = {...}) at framework/source/services/desktop.cxx:618 > #31 0x00007fff82ec95eb in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () at include/rtl/stringutils.hxx:170 > #32 0x00007fffabe3097d in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x60c000035e48, rURL="file:///xmlsecurity/qa/unit/signing/data/goodGPG.odt", rDocService="com.sun.star.text.TextDocument", rExtraArgs=empty uno::Sequence) at unotest/source/cpp/macros_test.cxx:50 > #33 0x00007fffb2ba9d2a in SigningTest::createDoc(rtl::OUString const&) (this=0x60c000035e00, rURL="file:///xmlsecurity/qa/unit/signing/data/goodGPG.odt") at xmlsecurity/qa/unit/signing/signing.cxx:204 > #34 0x00007fffb2bd1532 in SigningTest::testODFGoodGPG() (this=0x60c000035e00) at xmlsecurity/qa/unit/signing/signing.cxx:690 > #35 0x00007fffb2c304fd in std::__invoke_impl<void, void (SigningTest::*&)(), SigningTest*&>(std::__invoke_memfun_deref, void (SigningTest::*&)(), SigningTest*&) (__f=@0x6030001f0480: (void (SigningTest::*)(SigningTest * const)) 0x7fffb2bd0d80 <SigningTest::testODFGoodGPG()>, __t=@0x6030001f0490: 0x60c000035e00) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/invoke.h:73 > #36 0x00007fffb2c300e0 in std::__invoke<void (SigningTest::*&)(), SigningTest*&>(void (SigningTest::*&)(), SigningTest*&) (__fn=@0x6030001f0480: (void (SigningTest::*)(SigningTest * const)) 0x7fffb2bd0d80 <SigningTest::testODFGoodGPG()>, __args=@0x6030001f0490: 0x60c000035e00) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/invoke.h:95 > #37 0x00007fffb2c2ff2f in std::_Bind<void (SigningTest::*(SigningTest*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x6030001f0480, __args=...) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/functional:467 > #38 0x00007fffb2c2fb23 in std::_Bind<void (SigningTest::*(SigningTest*))()>::operator()<, void>() (this=0x6030001f0480) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/functional:549 > #39 0x00007fffb2c2e8d1 in std::_Function_handler<void (), std::_Bind<void (SigningTest::*(SigningTest*))()> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:316 > #40 0x00007fffb2c30b1c in std::function<void ()>::operator()() const (this=0x608000083660) at /usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/std_function.h:706 > #41 0x00007fffb2c2db41 in CppUnit::TestCaller<SigningTest>::runTest() (this=0x608000083620) at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175 > #42 0x00007ffff78fc159 in CppUnit::TestCaseMethodFunctor::operator()() const (this=0x7ffff2e9c0d0) at TestCase.cpp:32 > #43 0x00007fffdc3cc8e3 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (this=0x602000019910, functor=...) at test/source/vclbootstrapprotector.cxx:48 > #44 0x00007ffff78ccf96 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (this=0x6030002189e0) at ProtectorChain.cpp:20 > #45 0x00007fffe8938ab3 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (this=0x6020000003f0, functor=...) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89 > #46 0x00007ffff78ccf96 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (this=0x603000218a10) at ProtectorChain.cpp:20 > #47 0x00007fffebc1e492 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (this=0x602000000250, functor=..., context=...) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63 > #48 0x00007ffff78ccf96 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (this=0x603000218a40) at ProtectorChain.cpp:20 > #49 0x00007ffff7863084 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (this=0x602000000150, functor=..., context=...) at DefaultProtector.cpp:15 > #50 0x00007ffff78ccf96 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const (this=0x603000218a70) at ProtectorChain.cpp:20 > #51 0x00007ffff78c68f5 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (this=0x60b000000510, functor=..., context=...) at ProtectorChain.cpp:86 > #52 0x00007ffff795e259 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x7ffff2f000a0, functor=..., test=0x608000083620, shortDescription="") at TestResult.cpp:182 > #53 0x00007ffff78fa785 in CppUnit::TestCase::run(CppUnit::TestResult*) (this=0x608000083620, result=0x7ffff2f000a0) at TestCase.cpp:91 > #54 0x00007ffff798c2fe in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (this=0x608000081820, result=0x7ffff2f000a0) at TestRunner.cpp:47 > #55 0x00007ffff795ccdf in CppUnit::TestResult::runTest(CppUnit::Test*) (this=0x7ffff2f000a0, test=0x608000081820) at TestResult.cpp:149 > #56 0x00007ffff798d23f in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x7ffff2f4db00, controller=..., testPath="") at TestRunner.cpp:96 > #57 0x000000000052e3a9 in (anonymous namespace)::ProtectedFixtureFunctor::run() const (this=0x7ffff2f00350) at sal/cppunittester/cppunittester.cxx:319 > #58 0x000000000052ae38 in sal_main() () at sal/cppunittester/cppunittester.cxx:469 > #59 0x0000000000529e2c in main(int, char**) (argc=23, argv=0x7fffffff2798) at sal/cppunittester/cppunittester.cxx:376 Change-Id: I386a3b316c78344c2449568894c0f03ba39b1bf0 Reviewed-on: https://gerrit.libreoffice.org/46249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:unnecessaryparen (clang-cl)Stephan Bergmann
Change-Id: I0c5f11f305fff61ccf849ec5bcc3a9218797f7f5 Reviewed-on: https://gerrit.libreoffice.org/46199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall (clang-cl)Stephan Bergmann
Change-Id: I31018af8d992c9496f01a72925e24d9b362e340d Reviewed-on: https://gerrit.libreoffice.org/46204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:conststringvar (clang-cl)Stephan Bergmann
Change-Id: Icb0e32716ae58886912a1a1c7c50e66f30256227 Reviewed-on: https://gerrit.libreoffice.org/46202 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-10remove unused osl/time.h includes ..Jochen Nitschke
and some more in base64.cxx Change-Id: I31c9f23d3bd11f5482774e976a7c40025ffcfb86 Reviewed-on: https://gerrit.libreoffice.org/46157 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-09gpg4libre: check if we can really verify OpenPGP signaturesThorsten Behrens
And disable unit tests otherwise Change-Id: I32e1d8d2f8b0013d9cb43b78a55d23a1a29a8e8d Reviewed-on: https://gerrit.libreoffice.org/46057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-08rtlRandomPool: remove pointless seeding with system timeThorsten Behrens
Change-Id: I88647a66a72d092303560a4348ce3dc55ee6c321 Reviewed-on: https://gerrit.libreoffice.org/46055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-08gpg4libre: multi-select encryption certs, hide desc entryThorsten Behrens
Change-Id: I50ea6e82f18f296ea24f6e0d0e0e2eb381a5e54b Reviewed-on: https://gerrit.libreoffice.org/46052 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-08gpg4libre: rename GPGME_HAVE_GPGME to HAVE_FEATURE_GPGMEThorsten Behrens
Change-Id: I6f085b67c3477f427bd1efd96db93cbb89e20647 Reviewed-on: https://gerrit.libreoffice.org/46050 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-07gpg4libre: handle unavailable gpg crypto tools more gracefullyThorsten Behrens
Change-Id: I58af9d38ea8d202d2bda64cdf45204646ac9fd29
2017-12-07gpg4libre: return key fingerprint / hashes including null characterThorsten Behrens
Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2
2017-12-07gpg4libre: permit multi-select encrypt certThorsten Behrens
And pass down all necessary parameters everywhere Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0
2017-12-07gpg4libre: find keymanager executable on WindowsThorsten Behrens
Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e
2017-12-07loplugin:salcall handle static methodsNoel Grandin
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07gpg4libre: add unit tests for ODF signing featureThorsten Behrens
Since this requires a working gpg setup, limit to linux for the moment. If you need to add signatures or redo them, run LibreOffice from a shell with env var GNUPGHOME=<core>/xmlsecurity/qa/unit/signing/data/ set. For editing keys, gpg2 also accepts a --homedir=<core>/xmlsecurity/qa/unit/signing/data/ option Change-Id: I59e5b563098b19d05c8c2db32537241bc835fc80 Reviewed-on: https://gerrit.libreoffice.org/45950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-06xmlsecurity: fix loplugin:salcall warningsMiklos Vajna
Change-Id: Ic2df4e402ce1e855fbf9d9f6d8a37e664d0110c7
2017-12-06Restore GPG SEInitializer serviceKatarina Behrens
user config now needs it to collect user's private GPG keys Change-Id: Ia4ad4133b621160cf37281750cafa9f3c5c3c231 Reviewed-on: https://gerrit.libreoffice.org/45562 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-06loplugin:salcall handle virtual methodsNoel Grandin
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42 Reviewed-on: https://gerrit.libreoffice.org/45851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05gpg4libre: add gpgme config header where gpgme.h is includedThorsten Behrens
Also pull in config_lgpl.h in that case. Change-Id: Iae4e56ee8023066581c562c66305875a0fe15f37 Reviewed-on: https://gerrit.libreoffice.org/45809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-29loplugin:unnecessaryparen (clang-cl)Stephan Bergmann
Change-Id: I3a2b7ed3fdef3b77c0a052b10f88918aa616779e Reviewed-on: https://gerrit.libreoffice.org/45469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27Silence clang-cl -Werror,-Wundef in workdir/UnpackedTarball/gpgmepp/ includesStephan Bergmann
> workdir/UnpackedTarball/libgpg-error/src\gpg-error.h(709,5): error: '__GNUC__' is not defined, evaluates to 0 [-Werror,-Wundef] > #if __GNUC__ > ^ > 1 error generated. Change-Id: Icae46745069431e60faa7d2e6ca44ab800e72b95 Reviewed-on: https://gerrit.libreoffice.org/45341 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-26move conditional stuff to RepositoryExternal.mkDavid Tardon
Change-Id: I33e299277c53e8e2b8ab7e4cdf52d2487f90b51b Reviewed-on: https://gerrit.libreoffice.org/45211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2017-11-24fix build with system gpgmeppDavid Tardon
Change-Id: If0c81f5095b61d41b90db2e596bf5905b15ab506 Reviewed-on: https://gerrit.libreoffice.org/45210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2017-11-24EPUB export: implement character properties of links from named stylesMiklos Vajna
ODF allows text properties on hyperlinks directly, librevenge wants an inner span instead. Change-Id: I903045a688bf318e7ac7f8cac83bb4d537259969 Reviewed-on: https://gerrit.libreoffice.org/45161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-23gpg4libre: conditional-compile gpgme codeThorsten Behrens
Change-Id: I1d139a7b6df271d61bedd107c6b3a0535d233606 Reviewed-on: https://gerrit.libreoffice.org/45124 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-22fix buildThorsten Behrens
Change-Id: Ibb83ef0bb6a304f2e78a669502a1bdd1f6dcc4bd
2017-11-22gpg4libre: enable gpgme support for Windows and OSXThorsten Behrens
Change-Id: Ifa266e1c18a8a09cd5c815adc70d0236e00f72b5 Reviewed-on: https://gerrit.libreoffice.org/45092 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-22gpg4libre: fix warningsThorsten Behrens
This code was not previously built on Windows Change-Id: I9394907f143d862f40c95672f4e3398b65b7bd2c Reviewed-on: https://gerrit.libreoffice.org/45091 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>