Commit Graph
674 Commits
Author SHA1 Message Date
Miklos Vajna 04bfd8bf76 xmlsecurity nss: create SecurityEnvironment instances with a constructor
Change-Id: If4b18747292dd265d789b70078979361bd044fde
Reviewed-on: https://gerrit.libreoffice.org/52039
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-29 09:07:51 +02:00
Miklos Vajna b4c08ecf51 xmlsecurity: remove no longer needed Windows XP workaround
Change-Id: Id3f024fefc0b2bd6f837ecfdd907f0d107600910
Reviewed-on: https://gerrit.libreoffice.org/51759
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-23 13:27:34 +01:00
Miklos Vajna f3e8d0fb31 xmlsecurity: create XMLDocumentWrapper instances with a constructor
Change-Id: I23bca00fb0fbcae92e73c4a106b08edd5caf5cf9
Reviewed-on: https://gerrit.libreoffice.org/51720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-22 09:05:41 +01:00
Stephan Bergmann cdd14e60bb loplugin:unnecessaryoverride (clang-cl)
Change-Id: I96c2e28f14e50eed5b729170cd30fd54f00d89f3
Reviewed-on: https://gerrit.libreoffice.org/50944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-08 14:35:08 +01:00
Miklos Vajna 4bb67227c1 xmlsecurity: create XMLElementWrapper instances with a constructor
Change-Id: I0fe7d0a21b0ea35b537466316a637a0a46c52fe5
Reviewed-on: https://gerrit.libreoffice.org/50601
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-02 08:07:52 +01:00
Miklos Vajna 7ef644e7e5 xmlsecurity mscrypt: create XMLSecurityContext instances with a constructor
Change-Id: If535e153e587448232bf1451fa159d976e61be37
Reviewed-on: https://gerrit.libreoffice.org/50534
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-01 10:06:43 +01:00
Miklos Vajna 0f62b798ac xmlsecurity nss: create XMLSecurityContext instances with a constructor
Change-Id: I0133469e08b6d48aaf949e928ec4436d309963eb
Reviewed-on: https://gerrit.libreoffice.org/50223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-26 09:08:52 +01:00
Miklos Vajna a2e53070ca xmlsecurity mscrypt: create XMLSignature instances with a constructor
Change-Id: Ie30885226d1ede4293adc888e587d6111343f5af
Reviewed-on: https://gerrit.libreoffice.org/50144
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-23 09:05:59 +01:00
Miklos Vajna 48d3ff5c49 xmlsecurity nss: create XMLSignature instances with a constructor
Change-Id: Ic2968a1eda7517ba4cfb67d0cf68fb7de1ac1935
Reviewed-on: https://gerrit.libreoffice.org/49685
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-14 09:08:17 +01:00
Mike Kaganski 26eee611cb xmlsecurity: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I8303ba62198f4beb934623df7c52bf484a66a5e5
Reviewed-on: https://gerrit.libreoffice.org/49059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-02 13:13:20 +01:00
Stephan Bergmann 9af8f190ed More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "More
loplugin:cstylecast"

Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:54:51 +01:00
Stephan Bergmann e5262ed74d More loplugin:cstylecast: xmlsecurity
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-12 20:08:53 +01:00
Miklos Vajna 9e27e5a736 xmlsecurity: remove unused xml_security::serial_number_adapter
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-05 09:03:48 +01:00
Andrea Gelmini 677d606021 Fix typos
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-17 10:18:40 +01:00
Stephan Bergmann c3250baa4a loplugin:salcall (clang-cl)
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-15 14:46:51 +01:00
Miklos Vajna 1390c91c75 [API CHANGE] offapi: remove unused css.security.SerialNumberAdapter
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-14 14:23:33 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
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-11 12:13:46 +01:00
Stephan Bergmann 50b0f93f3e loplugin:unnecessaryparen (clang-cl)
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-11 10:44:41 +01:00
Stephan Bergmann aad6e593f7 loplugin:salcall (clang-cl)
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-11 08:57:37 +01:00
Jochen Nitschke 0201942d31 remove unused osl/time.h includes ..
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-10 12:29:50 +01:00
Thorsten Behrens c83b09ab19 rtlRandomPool: remove pointless seeding with system time
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-08 11:57:55 +01:00
Thorsten Behrens 1e71870034 gpg4libre: rename GPGME_HAVE_GPGME to HAVE_FEATURE_GPGME
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-08 09:13:51 +01:00
Katarina Behrens 1c58b047d1 Restore GPG SEInitializer service
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-06 12:26:40 +01:00
Noel Grandin c0ac78c971 loplugin:salcall handle virtual methods
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-06 07:42:50 +01:00
Noel Grandin 68f8645752 new loplugin salcall: remove unnecessary SAL_CALL
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-12-04 07:24:52 +01:00
Stephan Bergmann 368f806aaa loplugin:unnecessaryparen (clang-cl)
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-29 12:00:42 +01:00
Thorsten Behrens 43ac50dccc gpg4libre: conditional-compile gpgme code
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-23 12:13:43 +01:00
Thorsten Behrens 17c7d87643 gpg4libre: fix warnings
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-22 17:57:56 +01:00
Miklos Vajna e8c20aafb1 xmlsecurity mscrypt: use SAL_N_ELEMENTS()
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-22 10:28:10 +01:00
Noel Grandin 0d50804e1c loplugin:constparams in various(2)
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-06 07:13:42 +01:00
Stephan Bergmann 2cfe488022 loplugin:includeform: xmlsecurity (Windows)
Change-Id: Ib996672d7acd7d0dbf446eb8a4f8812680795e35
2017-10-27 19:28:50 +02:00
Stephan Bergmann 35a2b55a13 loplugin:includeform: xmlsecurity
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-10-23 22:45:46 +02:00
Mike Kaganski 1944e3ddc0 Rename and move SAL_U/W to o3tl::toU/W
Previosly (since commit 9ac98e6e34)
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-05 16:02:52 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
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-04 15:18:00 +02:00
Stephan Bergmann 53e6d0a087 loplugin:flatten (clang-cl, xmlsecurity)
Change-Id: I6c2d7f235df94b13b0501cce4ad1a699a9a1169c
Reviewed-on: https://gerrit.libreoffice.org/42981
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-01 08:58:28 +02:00
Mike Kaganski c3609f107b Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
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-30 19:08:28 +02:00
Mike Kaganski 362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
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-30 11:23:41 +02:00
Noel Grandin 1ffba0e356 loplugin:flatten check for throw in then clause
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-29 08:51:48 +02:00
Noel Grandin 5953099032 loplugin:flatten in vcl..xmlsecurity
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-27 09:06:10 +02:00
Mike Kaganski afeff9102c Use even more WIN32_LEAN_AND_MEAN
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-18 01:13:30 +02:00
Thorsten Behrens ca6ab632a8 gpg4libre: add sha512 support
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-10 01:42:55 +02:00
Katarina Behrens 9c165fe308 gpg4libre: When encrypting, show all available GPG keys
(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-03 01:10:11 +02:00
Stephan Bergmann 9a81c6933b loplugin:constparams: xmlsecurity (clang-cl)
Change-Id: If79b5c1bfdecc8e40247e9f1b2ba314f06ebbe84
2017-08-31 12:14:41 +02:00
Gautam Prajapati 511ae02c64 Android: Enable HAVE_FEATURE_NSS and package the NSS libraries with apk
This commit enables HAVE_FEATURE_NSS for Android and fixes the svl/ vcl/
and xmlsecurity/ module to use NSS.

xmlsecurity/ wasn't built for Android previously, this commit enables
building xmlsecurity/ for Android and disables the support of gpgme
in the same module(Only for Android).

It also enables the linking of NSS shared libraries with
liblo-native-code.so and adds a rule to package them along with the apk.

Change-Id: I7d0341688ac979ae92e9145c37dd107670417fe1
Reviewed-on: https://gerrit.libreoffice.org/41308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-23 17:50:55 +02:00
Stephan Bergmann 8106bea9e9 loplugin:nullptr (clang-cl)
Change-Id: I2d4aea9829cc8057849ba4fb0b8a60b4f4d2054d
2017-08-18 10:10:00 +02:00
Noel Grandin 61d49afadb loplugin:unusedmethods
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b
Reviewed-on: https://gerrit.libreoffice.org/40876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 20:56:30 +02:00
Miklos Vajna 166f13ef65 xmlsecurity: remove unused XMLEncryption_MSCryptImpl
This is unused since commit 2303d4f1a2
([API CHANGE] offapi: remove unused css.xml.crypto.XMLEncryption,
2017-07-18).

Change-Id: Icaf5054f13271a9040137f305bd7be40d1be6600
Reviewed-on: https://gerrit.libreoffice.org/40699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-03 09:54:42 +02:00
Noel Grandin 3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Noel Grandin b064a22f71 loplugin:constparams in xmlsecurity
Change-Id: I41f153af55262d201c0fb024460de0e9f1c14670
Reviewed-on: https://gerrit.libreoffice.org/40472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 10:58:32 +02:00
Miklos Vajna ece1072049 xmlsecurity mscrypt: drop unused parameters in akmngr
Change-Id: I5e8b3e472caa058c4c8f10b423783d963a6ab1c0
Reviewed-on: https://gerrit.libreoffice.org/40465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-27 08:07:34 +02:00