Commit Graph
600 Commits
Author SHA1 Message Date
Stephan Bergmann 4345cdb85a Clean up uses of SAL_U/SAL_W: xmlsecurity
Change-Id: I96043623a5b0e26ddc44de5c71743f3b0d8e1e50
2017-05-11 11:17:11 +02:00
Chris Sherlock 97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock a85694c4c7 tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assert
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
2017-05-07 13:03:03 +10:00
Stephan Bergmann eec04f7f04 loplugin:useuniqueptr (clang-cl)
Change-Id: I32c69544b40c2398f415e3aaa9beb470694f0290
2017-04-18 08:42:02 +02:00
Andrea Gelmini 3c3f7d784e Removed duplicated includes
No automatic tools. Manual checked and tested.

Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754
Reviewed-on: https://gerrit.libreoffice.org/36371
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-13 07:46:16 +02:00
Stephan Bergmann 9ac98e6e34 Finally switch MSVC to sal_Unicode = char16_t, too
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone).  So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.

Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 16:12:11 +00:00
Andrea Gelmini 74117f9597 Fix typos
Change-Id: I901ff35ad2e0aa43a421f0996865130514a819bc
Reviewed-on: https://gerrit.libreoffice.org/35663
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 13:10:53 +00:00
Stephan Bergmann fe7a5fe993 loplugin:subtlezeroinit (clang-cl)
Change-Id: I0a36bcf15fff74ed2f707608e04ad6596614dfd1
2017-03-14 14:49:58 +01:00
Miklos Vajna 42460fd4eb xmlsecurity: avoid using the SerialNumberAdapter wrapper
This service is only used in xmlsecurity and it's a wrapper around two
free functions in the same module.

Change-Id: Ibc5a026b51eda6c2b4b27b7254dedc220dbf909a
Reviewed-on: https://gerrit.libreoffice.org/34772
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-02 08:35:54 +00:00
Samuel Mehrbrodt baee96e04a Remove commented out code
Change-Id: I1da07c52380e543b80c7725a8420c1927743257d
Reviewed-on: https://gerrit.libreoffice.org/34587
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-23 16:47:24 +00:00
Samuel Mehrbrodt 3788d6a264 Remove commented out code
Change-Id: I36e5f4072ac52a3073d13e4ad5185ead7611e722
Reviewed-on: https://gerrit.libreoffice.org/34586
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-23 16:36:21 +00:00
Stephan Bergmann 7dedccd06d loplugin:subtlezeroinit: xmlsecurity
Change-Id: Ife06c74e1665273350b497a1a584d7f76297c13d
2017-02-21 07:34:54 +01:00
Jochen Nitschke 696479aafa cppcheck: redundantAssignment
Change-Id: I4537ced9dafb5b20dbf8cfb7d335698536067c49
Reviewed-on: https://gerrit.libreoffice.org/34436
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20 06:04:06 +00:00
Stephan Bergmann 8ca2d453e3 Some simplifications, using UNO_QUERY_THROW
Change-Id: I6e7555472da6b23af4c64b299182339a5b324ee9
Reviewed-on: https://gerrit.libreoffice.org/34250
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:16:26 +00:00
Stephan Bergmann fed3783e77 Add missing #includes
...like 6dce9c6757, for Windows-only code

Change-Id: I35f37aae2e6f55ff8ed82afc710a9b59a43b028c
2017-02-08 08:40:06 +01:00
Stephan Bergmann 6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Stephan Bergmann 5595ee701e loplugin:useuniqueptr
Change-Id: I3a246a22baaac8195dc1b94c42994de7d80e8336
2017-02-02 15:17:52 +01:00
Julien Nabet 018ed00d5b cppcheck: postfix operator
Change-Id: I2b6f0c922b0e70ecbf79f60831ff5d71cd1438fb
Reviewed-on: https://gerrit.libreoffice.org/33656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-29 09:46:36 +00:00
Noel Grandin 4142e0a0c0 loplugin: unnecessary destructor writerfilter..xmloff
Change-Id: I511822dc874101ed3b9850b015b746a86d26c3b5
Reviewed-on: https://gerrit.libreoffice.org/33578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:51:11 +00:00
Stephan Bergmann e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Stephan Bergmann 8cb18eb82d loplugin:dynexcspec (clang-cl), xmlsecurity
Change-Id: Iaa817d1da0c648c3a1feb0ef1e4500808a868644
2017-01-20 11:53:29 +01:00
Stephan Bergmann 8ccd11e1ae New loplugin:dynexcspec: Add @throws documentation, xmlsecurity
Change-Id: I2447c028add359952e4bd36dbdc1d5431fe48104
2017-01-19 18:03:08 +01:00
Caolán McNamara f6572fa96c tweak to avoid coverity#1371169 Missing move assignment operator
Change-Id: I0d29ce18c19c26a7526dad98d77db4670d0c5303
2017-01-19 10:02:13 +00:00
Caolán McNamara 16c9933666 convert to std::vector
Change-Id: I77ac7701ccb35aa32152d85a20fc59ed0bd942cf
2017-01-18 21:33:47 +00:00
Stephan Bergmann 33c81a4580 loplugin:externvar (clang-cl)
Change-Id: I6f4c294cb15a4426545d05be7b0a7f26f580563c
2017-01-11 13:42:42 +01:00
Stephan Bergmann a32c0f4a1e New loplugin:externvar: xmlsecurity
Change-Id: I25ee9a65b481c63ab2629be54768793d254341b5
2017-01-09 15:38:51 +01:00
Tor Lillqvist b1c1458760 Revert "[API CHANGE] createSecurityContext() was always called with an empty string"
I got cold feet. I don't want to have to revert this many years later
instead, when some obscure 3rd-party software stops working.

This reverts commit e1ce7bad62.
2016-12-22 08:48:16 +02:00
Tor Lillqvist e1ce7bad62 [API CHANGE] createSecurityContext() was always called with an empty string
So drop the parameter then and propagate fallout in the Windows
implementation in xmlsecurity. The NSS implementation already ignored
the parameter completely.

This interface is not 'published' and the parameter was even marked as
'reserved for internal use' so I doubt any external code has used it.

Change-Id: I5915b941b79cfddadc8137c32ed07c20c9ccaa37
2016-12-21 21:24:09 +02:00
Tor Lillqvist 317278525a Bin now unused fields
Change-Id: Ie2179bc61ca59a5f5ea2bed1c5c0b2c1dea55474
2016-12-21 17:49:18 +02:00
Tor Lillqvist 62fe303d16 Bin now unused functions
Change-Id: I515279becbb219c94a52bb1ebf9d1ab33402dae0
2016-12-21 17:49:18 +02:00
Tor Lillqvist efe9d1df69 Don't add empty TODO functions to libxmlsec, and don't call them
Change-Id: Iaec1de29a0e7f3ea8eb10869382401d121de2c8a
2016-12-21 17:35:24 +02:00
Stephan Bergmann 54c401d775 loplugin:staticmethods (clang-cl)
Change-Id: Id97600a7d29fbe938d67ea074ca12dd665a29cc3
2016-12-16 15:28:40 +01:00
Miklos Vajna a7c35729e0 xmlsecurity: hold XMLDocumentWrapper by rtl::Reference in XSecController
Going via UNO for a class in the same module is an overkill.

Change-Id: Idf706782e5844fd2e553c44966e1dd1104dce8e7
Reviewed-on: https://gerrit.libreoffice.org/32030
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-15 09:15:38 +00:00
Miklos Vajna 9bd471cb76 xmlsecurity: clean up not needed C2U macro in xmldocumentwrapper
Also remove some auto-generated documentation that adds no useful
information.

Change-Id: I5e5c5dd6aaa3fb6953c38d6e82fa13737217c25c
Reviewed-on: https://gerrit.libreoffice.org/31748
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-08 09:17:53 +00:00
Tor Lillqvist 0b719cd36d No reason for these member functions to be virtual
Not sure what the author was thinking, or what the comment '//Native
methods' was supposed to mean.

Change-Id: I9e45de6f24531a99770d98f415fea6a1cfd7d2c2
2016-11-28 11:40:05 +02:00
Tor Lillqvist ed22c0cdb1 Bin SecurityEnvironment_MSCryptImpl::getPriKey() as it always returns NULL
Fallout from my previous commit.

Change-Id: I4436721e719514d6ecf7847113957827c910d65a
2016-11-28 11:40:05 +02:00
Tor Lillqvist fb414a04fc Bin SecurityEnvironment_MSCryptImpl::m_tPriKeyList as it was always empty
Change-Id: I5f35c702ff9a613c6601cd0c3c42e9fc4f4e26a6
2016-11-28 11:40:04 +02:00
Tor Lillqvist 0ddcff2053 No need for this local function to be externally visible
Change-Id: Idb2e716cdc4933c2691de2df21a4ee7afda9e597
2016-11-25 15:02:45 +02:00
Tor Lillqvist dcbfa4be9b Show also the message for the last Windows error in our own error handler
That is what the default libxmlsec error handler
xmlSecMSCryptoErrorsDefaultCallback() does. Why show less information
in our own handler?

Change-Id: Ibc9f9b5066536d0f5cabbf2bda6d1fa14eca5613
2016-11-24 11:57:21 +02:00
Tor Lillqvist 8b8f315b51 Nothing from that namespace used here
Change-Id: I05450a0af00b200145312301207b8f6d3af05145
2016-11-24 11:33:58 +02:00
Tor Lillqvist 8f08d48780 Bin copy-pasted comment that is meaningless here
Change-Id: Ie18a1bd4c006a9c7a54dc79747cb7e300315640a
2016-11-24 11:32:05 +02:00
Noel Grandin 5f77e6e930 update loplugin:unnnecessaryvirtual to handler destructors
and update modules writerfilter..xmloff with the resulting changes

Change-Id: I54d19c22ddb0ff579b32e4934d266c925b19305c
Reviewed-on: https://gerrit.libreoffice.org/30530
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 07:15:03 +00:00
Noel Grandin 1b36f23b51 loplugin:oncevar in xmloff..xmlsecurity
Change-Id: I2353d3c73130ed9420e8d803a9a96a06549bb6bd
Reviewed-on: https://gerrit.libreoffice.org/30429
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 10:32:27 +00:00
Noel Grandin 7477ab1391 loplugin:inlineablemethods in xmloff
Change-Id: I22202f85c65a862ccdafe1d521e2945e3d99252a
2016-10-18 08:51:07 +02:00
Stephan Bergmann 774e51d44c clang-cl loplugin: xmlsecurity
Change-Id: Ic101384ca32abb0d527f97d2cf695eb19c66da86
Reviewed-on: https://gerrit.libreoffice.org/29838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-15 07:59:26 +00:00
Stephan Bergmann 91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Rosen 3c9d834af0 tdf#100726 Improve readability of OUString concatanations
concat string to easy readability

Change-Id: Ied5db1d74ad6266df558b859074257fd0049ad29
Reviewed-on: https://gerrit.libreoffice.org/27858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-04 05:49:55 +00:00
Caolán McNamara 1ebd5de9de Related: tdf#95144 now merge common code into a shared CertExtn struct
Change-Id: I7514e092e4314d7cadee33df0e964362777b0b83
2016-07-28 12:37:12 +01:00
Caolán McNamara b073ef9331 Related: tdf#95144 rework to avoid bad casts
Change-Id: I89f84dae055b9a1058771021cb42dbc442405206
2016-07-28 12:37:12 +01:00
Caolán McNamara 2c110872b5 Related: tdf#95144 Revert fixes for bad casts and unused fields
Revert "Bad cast from SanExtensionImpl to CertificateExtension_XmlSecImpl"

This reverts commit 321b8ff86b.

Revert "loplugin:singlevalfields in writerfilter and xmlsec"

This reverts commit a25327e4b1.

cause these two together mean that we get a certificate is
invalid dialog when the cert is perfectly fine on loading https
sources

Change-Id: Id8c1fb5ece4ecc0035500ce0b822a6b248d14282
2016-07-28 12:37:12 +01:00