summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)Author
2019-09-06Fixing '....' and '..'Andrea Gelmini
Change-Id: I926069d6c1f2712e5020d930f7ff6c62fd00e912 Reviewed-on: https://gerrit.libreoffice.org/78667 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-23tdf#39593 extract UnoTunnelId comparison to template functionArkadiy Illarionov
Change-Id: Ia2b5dea273c8de7b8c54e74780193a8d4cba7b45 Reviewed-on: https://gerrit.libreoffice.org/73874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-21loplugin:constvars, look for loop vars that can be constNoel Grandin
Change-Id: I67ee714739800f3718f9d3facf57474cd564d855 Reviewed-on: https://gerrit.libreoffice.org/77415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20tdf#116862 do not encrypt to self when encryption key is not setFranklin Weng
When "always encrypt to self" is checked but no encryption key is set, encrypting a file with GPG key would cause error. So check if msPreferredKey is empty or not before comparing with sIssuer. Change-Id: I4d95f0b436cb1fafad1d57d50330fd2080902b69 Reviewed-on: https://gerrit.libreoffice.org/77665 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16new loplugin:sequenceloopNoel Grandin
look for places we should be using std::as_const on for-range loops over uno::Sequence, to avoid triggering a copy Change-Id: I7efb641bf09d37c87946f03428ee4eec90298c8a Reviewed-on: https://gerrit.libreoffice.org/77441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-14Simplify OUString array initializationMike Kaganski
Change-Id: I54945ed1ea2292ecc02ff988c4ecf310a9c4b87a Reviewed-on: https://gerrit.libreoffice.org/77451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-14Don't hardcode "C:\\Program Files (x86)" path on WindowsMike Kaganski
It might be simple "Program Files" on 32-bit system; or localized (see https://www.samlogic.net/articles/program-files-folder-different-languages.htm), or on a different drive (if system isn't on C:), etc. Change-Id: Id0f28b4c4920fcda53a58fbff9f42bcfde6668f6 Reviewed-on: https://gerrit.libreoffice.org/77448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-13tdf#116085 add more Gpg4Win binary locationsThorsten Behrens
Seems Gpg4Win recently grew a few more variants where to put stuff. Look there, too. Change-Id: Ifa09db11665671f518a6a66480c1a71fd619d8cd Reviewed-on: https://gerrit.libreoffice.org/77341 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-08-10assertDocument is only defined for HAVE_FEATURE_GPGVERIFYStephan Bergmann
Change-Id: I2dbe5da48d1114703481fffcc310f775308df007 Reviewed-on: https://gerrit.libreoffice.org/77236 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-06tdf#42316 preserve macro signature of templatesJan-Marek Glogowski
When comparing the filter of the current and the target document we have to strip the '_template' from the filter name. Still this won't preserve the signature of the document attached to tdf#42316, as this is a ODF 1.0 OTT, which doesn't have a valid signature in ODF 1.2, as the signature doesn't match the ODF 1.2 namespace for signatures and the default LO ODF version is ODF 1.2 extended. In theory the signature itself could even be converted most times, but that can be done in an additional patch, if needed. Since the code literally saves a template to an internal document, SfxObjectShell::DoSaveCompleted must keep the signature of the template. Eventually it'll be dropped on save of the template as a document later. The signing tests check "OTT 1.0 => ODT 1.0: preserve", "OTT 1.2 => ODT 1.2: preserve" and "OTT 1.0 => ODT 1.2: drop". Change-Id: I2263093687f5a0568ea781ce3ac9b114c9599add Reviewed-on: https://gerrit.libreoffice.org/75958 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-31Fix typosAndrea Gelmini
Change-Id: I69e5c6d82fddd1da1e414e7764f3a5d90351a43d Reviewed-on: https://gerrit.libreoffice.org/76377 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): xmlsecurityStephan Bergmann
Change-Id: I47c93247b9a34abf4b95966833664e63eb57f133 Reviewed-on: https://gerrit.libreoffice.org/76621 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-25Fix typosAndrea Gelmini
Change-Id: I59a0fd175fa5185c15d093d2d9bed9f95bb4cfd5 Reviewed-on: https://gerrit.libreoffice.org/76280 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-24Fix typosAndrea Gelmini
Change-Id: Ib778a6598f3797fe871a25b56b7b4b7761889296 Reviewed-on: https://gerrit.libreoffice.org/76269 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-21loplugin:referencecasting in xmlsecurityNoel Grandin
Change-Id: Ic3daba9e6e94516ea4d80f25f73e9e46a50edb5c Reviewed-on: https://gerrit.libreoffice.org/76035 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16cid#1448421 unsafe_xml_parse_configCaolán McNamara
do we need this as 1 ? Change-Id: I12cdec90f5ca989767a769dfc1dbebf73fae696c Reviewed-on: https://gerrit.libreoffice.org/75658 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-16cid#1448248 Unchecked return valueCaolán McNamara
Change-Id: I3b50d3affeb0c25a12dcb2ae0d5c2216d5419249 Reviewed-on: https://gerrit.libreoffice.org/75659 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-18loplugin:passstuffbyrefNoel Grandin
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb Reviewed-on: https://gerrit.libreoffice.org/74246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18loplugin:logexceptionnicely in xmlhelp..xmlsecurityNoel Grandin
Change-Id: Idbf0de3f953b08f98144241346533ad30f49269e Reviewed-on: https://gerrit.libreoffice.org/74285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-04XSecController must be a complete type here (Windows --disable-pch)Stephan Bergmann
...when instantiating implicitly defined special member functions of XMLSECURITY_DLLPUBLIC XMLSignatureHelper, due to mpXSecController member Change-Id: Ifd504c1b215a8a1a86d7a9d660aa569b75e07d50 Reviewed-on: https://gerrit.libreoffice.org/73406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-03tdf#39593 use UNO3_GETIMPLEMENTATION* macrosArkadiy Illarionov
Change-Id: I4e9af3b43a5baf19e100f42b3f37a2ade89ada5d Reviewed-on: https://gerrit.libreoffice.org/73320 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-29Removed duplicated includeAndrea Gelmini
In any case is included a few lines after, so I guess it can be removed the check (if it's not ready also for future other includes). Change-Id: Id603022092a60b71a5b35ec57930146d23c6544a Reviewed-on: https://gerrit.libreoffice.org/73093 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-27xmlsecurity: add missing includeMiklos Vajna
Broke the build on Ubuntu 18.04: In file included from /home/tinderbox/core-master/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hpp:10:0, from /home/tinderbox/core-master/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hpp:8, from /home/tinderbox/core-master/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:8, from /home/tinderbox/core-master/include/com/sun/star/uno/Any.hxx:37, from /home/tinderbox/core-master/include/com/sun/star/uno/genfunc.hxx:27, from /home/tinderbox/core-master/include/com/sun/star/uno/Sequence.hxx:35, from /home/tinderbox/core-master/include/svl/sigstruct.hxx:27, from /home/tinderbox/core-master/xmlsecurity/inc/xsecctl.hxx:23, from /home/tinderbox/core-master/xmlsecurity/source/helper/xsecctl.cxx:22: /home/tinderbox/core-master/include/com/sun/star/uno/Reference.hxx: In instantiation of ‘static com::sun::star::uno::XInterface* com::sun::star::uno::Reference< <template-parameter-1-1> >::iquery(com::sun::star::uno::XInterface*) [with interface_type = com::sun::star::xml::crypto::XXMLSignature]’: /home/tinderbox/core-master/include/com/sun/star/uno/Reference.hxx:279:42: required from ‘bool com::sun::star::uno::Reference< <template-parameter-1-1> >::set(const com::sun::star::uno::BaseReference&, com::sun::star::uno::UnoReference_Query) [with interface_type = com::sun::star::xml::crypto::XXMLSignature]’ /home/tinderbox/core-master/xmlsecurity/source/helper/xsecctl.cxx:190:124: required from here /home/tinderbox/core-master/include/com/sun/star/uno/Reference.hxx:70:73: error: incomplete type ‘com::sun::star::xml::crypto::XXMLSignature’ used in nested name specifier return BaseReference::iquery(pInterface, interface_type::static_type()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /home/tinderbox/core-master/solenv/gbuild/LinkTarget.mk:290: recipe for target '/home/tinderbox/core-master/workdir/CxxObject/xmlsecurity/source/helper/xsecctl.o' failed make[1]: *** [/home/tinderbox/core-master/workdir/CxxObject/xmlsecurity/source/helper/xsecctl.o] Error 1 Change-Id: I864da5bd6d163a3de35280bff367e6b51aced23d Reviewed-on: https://gerrit.libreoffice.org/73035 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-27operator new doesn't return null anywayStephan Bergmann
(and assigning nullptr to a null xcert was apparently redundant) Change-Id: I8b6120248c042adcb2f787b8db0f28c14268212d Reviewed-on: https://gerrit.libreoffice.org/73019 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-20writerfilter: make RTFParserState members private, part 1Miklos Vajna
Change-Id: Iae4d454e0b160ee7f5b39d252505748c693a9c9e Reviewed-on: https://gerrit.libreoffice.org/72554 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-15xmlsecurity: make DocumentSignatureManager members privateMiklos Vajna
Change-Id: I1262ca0dc2b2f843bdd6277415ee7967e9e59458 Reviewed-on: https://gerrit.libreoffice.org/72320 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-12regenerate PCH headersLuboš Luňák
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f Reviewed-on: https://gerrit.libreoffice.org/72195 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-10an is used before a vowel soundCaolán McNamara
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-09Simplify Sequence iterations in xmlscript, xmlsecurityArkadiy Illarionov
Use range-based loops or replace with comphelper or STL functions Change-Id: I3d63811caf80c87a9d560087e1f0d933ebcc0d55 Reviewed-on: https://gerrit.libreoffice.org/72040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-09tdf#42949 Fix IWYU warnings in xmlsecurity/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I89c77656ea4021cb16bd122cb1dd1cd803390c3d Reviewed-on: https://gerrit.libreoffice.org/71765 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-08Replace remaining lists by vectors in xmlsecurityJulien Nabet
Change-Id: Ia7e47e8398a0022a281de2b8866e779d471909b0 Reviewed-on: https://gerrit.libreoffice.org/71951 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-07Resolves: tdf#125132 xml signatures dialog should be modalCaolán McNamara
Change-Id: I6b8e93070e89e90341e02e8d714c47d4b0931845 Reviewed-on: https://gerrit.libreoffice.org/71899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-07Replace list by vector in xmlsecurity/gpgJulien Nabet
Change-Id: I746b4b2a83fcf41f38947dffc290574b18a3c691 Reviewed-on: https://gerrit.libreoffice.org/71889 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-02Use hasElements to check Sequence emptiness in [v-x]*Arkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-29xmlsecurity: fix the Android buildMiklos Vajna
Change-Id: Ib04060ee4dc2a4ece2858548690e8ef182bf00b1
2019-04-29tdf#42949 Fix IWYU warnings in xmlsecurity/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. All hxx cleaned except the ones in xmlsecurity/source/xmlsec/mscrypt Change-Id: I651f53c9d339208b3132f9078a5c3829ff9c5dc8 Reviewed-on: https://gerrit.libreoffice.org/71448 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-21Properly initialize gpgme-w32spawn.exe path on WindowsMike Kaganski
On Windows, gpgme expects gpgme-w32spawn.exe to be in the same directory as the current process executable. This assumption might be wrong, e.g., for bundled python, which is in instdir/program/python-core-x.y.z/bin, while gpgme-w32spawn.exe is in instdir/program. In this case, if an operation in a python script requires initializing gpgme, it will be interrupted by a modal warning box telling that gpgme-w32spawn.exe was not found. If we can't find gpgme-w32spawn.exe in the current executable location, then try to find the spawn executable, and inform gpgme about actual location using gpgme_set_global_flag. Change-Id: Ie30a0d4a6666767e8c54f1bdc67b67570d6ea47a Reviewed-on: https://gerrit.libreoffice.org/71014 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-15loplugin:sequentialassign in writerfilter..xmlsecurityNoel Grandin
Change-Id: I41028c704eca08b71746c3c87e38926b95449775 Reviewed-on: https://gerrit.libreoffice.org/70735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13use more std::make_uniqueNoel Grandin
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-09tdf#123747 xmlsecurity, ODF sign roundtrip: preserve invalid reference typeMiklos Vajna
Only add the correct type to new signatures to avoid breaking the hash of old ones. Change-Id: I30f892b292f84a0575a3d4ef5ccf3eddbe0090ca Reviewed-on: https://gerrit.libreoffice.org/70424 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4a3baffa8944b522b16b50975185759081662020 Reviewed-on: https://gerrit.libreoffice.org/69945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-16weld SwEditRegionDlgCaolán McNamara
Change-Id: I6aacd013a344caa731841ff4f015017ba16c4aca Reviewed-on: https://gerrit.libreoffice.org/69325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-16clarify that set_visible(true/false) is just show/hideCaolán McNamara
ditch duplicate method Change-Id: Iea35d6437f48809a06e093241bddf301f00c502b Reviewed-on: https://gerrit.libreoffice.org/69302 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-07build: support disabling popplerAshod Nakashian
This adds --enable-poppler configure option. Poppler can be enabled/disabled by setting this parameter to yes or no. Change-Id: I42ba2d27de7b5014d28523394310616d20073b71 Reviewed-on: https://gerrit.libreoffice.org/68602 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/68842 Tested-by: Jenkins
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Introduce o3tl::underlyingEnumValueStephan Bergmann
Change-Id: I6554eb86326159b0da707539f45c411f61c0f3de Reviewed-on: https://gerrit.libreoffice.org/68761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>