summaryrefslogtreecommitdiff
path: root/xmlsecurity/source
AgeCommit message (Collapse)AuthorFilesLines
2018-08-21xmlsecurity: nsscrypto_initialize: try to avoid profile migrationMichael Stahl1-0/+14
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.35_release_notes NSS 3.35 and later will automatically migrate migrate profiles from the old "dbm:" BDB format to the new "sql:" SQLite format. The new format can be read by NSS 3.12 and later, which is old enough that it can be assumed to be available. However LibreOffice still shouldn't migrate the profile on its own: LO typically uses a Mozilla Firefox or Thunderbird profile, and if it is a system Firefox with system NSS libraries, then it's probably a bad idea for LO to migrate the profile under Firefox's nose, particularly considering the "partial migration" scenario if the profile is password-protected. Try to avoid this by checking if the profile is the old format and explicitly using the "dbm:" prefix to prevent the migration. Change-Id: I06480522f830ce74e2fb7bf79fee84ad80979b82 Reviewed-on: https://gerrit.libreoffice.org/58756 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 61688aa1abd9db9adbb8dc5d5aacc6269b21fd27) Reviewed-on: https://gerrit.libreoffice.org/58974 (cherry picked from commit dc5474b2e2f361eec981c6955630dbb020442eae)
2018-06-27Fix CppunitTest_xmlsecurity_signing with system-xmlsec 1.2.26Miklos Vajna1-14/+37
Swap the order of the default and custom callback registration, since the order of lookup is now reversed since <https://github.com/lsh123/xmlsec/commit/968646fb9b8428174a112fce2f08b1ec89d0ed97>. Thanks Tomas Chvatal for reporting this. (cherry picked from commit 576f899811a22e83b6fb6a120c8da303b1f4cac1) xmlsecurity: check for the libxmlsec version runtime, not build-time For the general benefit of --with-system-xmlsec usage scenarios (where LO may be built against an old version of xmlsec and run against a new one). (cherry picked from commit bc4e43dd926bbe6f5315b5c372770ac8c7222177) Change-Id: I60a347454701a679db4ccd8924a723a236d5edff Reviewed-on: https://gerrit.libreoffice.org/55462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 3d532502c9a17049bdd383a3d5c56005222331b7) Reviewed-on: https://gerrit.libreoffice.org/55944 Tested-by: Jenkins (cherry picked from commit 355a59a7d4b0c8f50823d4bf68f0cb0c985a2b79)
2018-03-20lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky1-6/+0
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> (cherry picked from commit 101a79cc4d13a1f566c1b97c1329813eb7c61bcf)
2018-03-19xmlsecurity: fix loplugin:salcall warningsMiklos Vajna1-2/+2
Change-Id: Ic2df4e402ce1e855fbf9d9f6d8a37e664d0110c7 (cherry picked from commit ebfa6465378f5048d499df729c36b36617f50d80)
2018-01-16tdf#115011 don't crash on non-existent gpg supportThorsten Behrens1-3/+3
Change-Id: I90679472898648ccf0811c67c17f7bad41d4e347 Reviewed-on: https://gerrit.libreoffice.org/47984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 03afd4b72431a0dc197891d41fb7bf2419858380) Reviewed-on: https://gerrit.libreoffice.org/47994 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-19Do things with preferred GPG keysKatarina Behrens1-2/+27
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> (cherry picked from commit ee40674b4c9343db5e69cd5118bdbcf8e6edad6d) Reviewed-on: https://gerrit.libreoffice.org/46759 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-10gpg4libre: rename GPGME_HAVE_GPGME to HAVE_FEATURE_GPGMEThorsten Behrens4-9/+9
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> (cherry picked from commit 1e71870034c9e180f856f51dc2c183d2a6ba9ccd) Reviewed-on: https://gerrit.libreoffice.org/46069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-08gpg4libre: multi-select encryption certs, hide desc entryThorsten Behrens1-0/+5
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> (cherry picked from commit 6283cd07d44d9aeacffbedb99d23e4ee760c6eb6) Reviewed-on: https://gerrit.libreoffice.org/46083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-07gpg4libre: handle unavailable gpg crypto tools more gracefullyThorsten Behrens1-1/+1
Change-Id: I58af9d38ea8d202d2bda64cdf45204646ac9fd29 (cherry picked from commit ed50a0a2ce51584fa3a8fba0094220a4bf25c650)
2017-12-07gpg4libre: return key fingerprint / hashes including null characterfeature/gpg4libre-6-0Thorsten Behrens1-3/+3
Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2
2017-12-07gpg4libre: permit multi-select encrypt certThorsten Behrens4-25/+49
And pass down all necessary parameters everywhere Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0
2017-12-07gpg4libre: find keymanager executable on WindowsThorsten Behrens1-2/+10
Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e
2017-12-07Restore GPG SEInitializer serviceKatarina Behrens2-1/+45
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> (cherry picked from commit 1c58b047d117bb087abc571b74c06cdf7499b1a0)
2017-12-05gpg4libre: add gpgme config header where gpgme.h is includedThorsten Behrens3-0/+6
Also pull in config_lgpl.h in that case. Squashed in is this fix, too: android: fix gpgme build No need to include config_lgpl.h when gpgme is disabled. Change-Id: Iae4e56ee8023066581c562c66305875a0fe15f37 Reviewed-on: https://gerrit.libreoffice.org/45809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 5daa364922ba75442e2aa834095e9bef16d141d9) Reviewed-on: https://gerrit.libreoffice.org/45836 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-24EPUB export: implement character properties of links from named stylesMiklos Vajna1-1/+1
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 Behrens4-7/+12
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-22gpg4libre: fix warningsThorsten Behrens2-3/+3
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>
2017-11-22xmlsecurity mscrypt: use SAL_N_ELEMENTS()Miklos Vajna1-1/+3
Change-Id: I39ddffc48c169ca5c95b4cc6b4799530c5d1984e Reviewed-on: https://gerrit.libreoffice.org/45069 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-06loplugin:constparams in various(2)Noel Grandin1-1/+1
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-03Missing initialization of m_bInSignatureLineIdSamuel Mehrbrodt1-0/+1
Change-Id: I563f7324129828d13c4549d330d58d6ab972472c Reviewed-on: https://gerrit.libreoffice.org/44268 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
2017-11-03[API CHANGE] tdf#65393 Import signature line images from ooxmlSamuel Mehrbrodt4-2/+125
showing whether the signature behind the signature line is valid or not. Change-Id: Ia6cca62812019f26d55d234cac767a9b4b7c8175 Reviewed-on: https://gerrit.libreoffice.org/40980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-03xmlsecurity: can hold UriBindingHelper by rtl::ReferenceMiklos Vajna4-64/+4
... in XMLSignatureHelper and XSecController Change-Id: Ie3817684c9ed9ed8a222e3ba56c8fbc389a68071 Reviewed-on: https://gerrit.libreoffice.org/44193 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-27loplugin:includeform: xmlsecurity (Windows)Stephan Bergmann10-20/+20
Change-Id: Ib996672d7acd7d0dbf446eb8a4f8812680795e35
2017-10-26vcl: make MapMode constructor explicitMichael Stahl3-3/+3
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-25xmlsecurity: remove unused chainOn() argumentMiklos Vajna3-11/+7
Change-Id: Id4d4ae41eb6d667a96ce5d294dd5bf3fcf4cb686 Reviewed-on: https://gerrit.libreoffice.org/43801 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-23loplugin:includeform: xmlsecurityStephan Bergmann44-97/+97
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-10-19fix build with system gpgmeDavid Tardon1-2/+7
Change-Id: I00e6d6ce476adbd22bcfb4eb55d4db4194f4bc92
2017-10-18gpg4libre fix tdf#113190 don't show expired/invalid keysgpg4libre-review-5.4.99Thorsten Behrens1-1/+1
Change-Id: I30485bc97d3d287bd867b50398927eabe018914b Reviewed-on: https://gerrit.libreoffice.org/43502 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-18gpg4libre - tdf#113188 add option for minimal PGPKeyPacketThorsten Behrens1-1/+5
Change-Id: I660e68074616f6953e6527e40ec22276ce8ef2fb Reviewed-on: https://gerrit.libreoffice.org/43492 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-18xmlsecurity: remove unused m_xElementStackKeeperMiklos Vajna2-51/+1
Change-Id: Ibd7d39e288a4121428e83408ce67205eab3340c6 Reviewed-on: https://gerrit.libreoffice.org/43479 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-13xmlsecurity: remove unused XSecController::m_xNextNodeOnSAXChainMiklos Vajna1-5/+3
Change-Id: Ic5fd625afe2ef53968b87d1382b257e3d44ce08b Reviewed-on: https://gerrit.libreoffice.org/43354 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-06xmlsecurity: last 2 params of setSAXChainConnector() is always nullptrMiklos Vajna2-13/+5
So remove them. Change-Id: Iec2430af6634608bdc8c4beff6078ccceb7a2391 Reviewed-on: https://gerrit.libreoffice.org/43182 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski4-9/+13
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05TSCP: include certificate usage in paragraph signaturesAshod Nakashian3-6/+38
Change-Id: I6f4b891a016c67051efd9033329065d7e3c8a06b Reviewed-on: https://gerrit.libreoffice.org/43022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin4-6/+4
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-01loplugin:flatten (clang-cl, xmlsecurity)Stephan Bergmann1-4/+3
Change-Id: I6c2d7f235df94b13b0501cce4ad1a699a9a1169c Reviewed-on: https://gerrit.libreoffice.org/42981 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-30Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*Mike Kaganski2-9/+5
This is type-safe, and allows to catch cases where a source type is changed for some reason, but reinterpret_cast masks that Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1 Reviewed-on: https://gerrit.libreoffice.org/42961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski3-42/+30
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin1-19/+17
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27loplugin:flatten in vcl..xmlsecurityNoel Grandin3-35/+25
Change-Id: I730fc0b3b6b7ac1803d75b5d9e007b15395888c6 Reviewed-on: https://gerrit.libreoffice.org/42826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt1-2/+2
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21xmlsecurity: hold SignatureCreatorImpl by rtl::ReferenceMiklos Vajna1-33/+14
Not going via UNO means explicit interface casting can be avoided. Change-Id: I4fa2db810cade787913bca222530405d8d2eb6a9 Reviewed-on: https://gerrit.libreoffice.org/42573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski5-0/+15
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-14clang-tidy modernize-use-emplace in variousNoel Grandin2-11/+11
Change-Id: Id1bbd3f380c17beeaab11f7140d4df1304c3d0d8 Reviewed-on: https://gerrit.libreoffice.org/41750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-10gpg4libre: use SHA512 digests for GPG signing unconditionallyThorsten Behrens3-2/+12
Change-Id: I2ee6b0ba440a50b4627b3732c52afe08ba02d664 Reviewed-on: https://gerrit.libreoffice.org/42087 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-10gpg4libre: add sha512 supportThorsten Behrens3-4/+47
Change-Id: Ia5ef54e47e8528a33aba83ae2e317fac5cffb428 Reviewed-on: https://gerrit.libreoffice.org/42086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-06xmlsecurity: no need to have pdfio/pdfdocument.hxx as a global headerMiklos Vajna2-2/+2
Which means xmlsecurity can be again a module that has no public headers. Change-Id: I3d0b03680398f80196fac187263e770fd44ed0ed Reviewed-on: https://gerrit.libreoffice.org/41966 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-03gpg4libre: When encrypting, show all available GPG keysKatarina Behrens5-3/+24
(not only private ones) Change-Id: I3fd248f4cace1ea248267d5696da9cb70940744e Reviewed-on: https://gerrit.libreoffice.org/41508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-03gpg4libre: Recycle certificate selection dialog for encryptionKatarina Behrens4-5/+44
Change-Id: I699ecff1f62b3dae7ac275823c6721810589c4cf Reviewed-on: https://gerrit.libreoffice.org/41507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-31loplugin:constparams: xmlsecurity (clang-cl)Stephan Bergmann1-1/+1
Change-Id: If79b5c1bfdecc8e40247e9f1b2ba314f06ebbe84