Commit Graph
1498 Commits
Author SHA1 Message Date
Noel Grandin 389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00
Thorsten Behrens d4b0451a1a gpg4libre: we really only want private keys listed
Since this canSign/canEncrypt is fundamentally busted in gpgme,
outright limit all keys we're looking at to those with secrets.

Change-Id: Ib3dfbc8ef661430efc3a8c17f2f3166af8225a56
Reviewed-on: https://gerrit.libreoffice.org/37471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-11 13:37:21 +02:00
Stephan Bergmann 4345cdb85a Clean up uses of SAL_U/SAL_W: xmlsecurity
Change-Id: I96043623a5b0e26ddc44de5c71743f3b0d8e1e50
2017-05-11 11:17:11 +02:00
Thorsten Behrens 0a5d6ac82f xmlsecurity: slightly more modern c++
Change-Id: I680bd57a492fe04dc98f2f61ff292e44e544a483
Reviewed-on: https://gerrit.libreoffice.org/37451
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-10 16:24:17 +02:00
Thorsten Behrens 0a4b0db012 xmlsecurity/source/framework: un-screw-up indent
This was painful to read.

Change-Id: I34c8038f5db1b9d3f60e9541fa09bb803a680b54
Reviewed-on: https://gerrit.libreoffice.org/37450
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-10 01:13:09 +02:00
Noel Grandin 8dcb8c9105 loplugin:checkunusedparams in xmlsecurity
Change-Id: I9460e43264a8cbf3bb2aef83893288b767b2736f
Reviewed-on: https://gerrit.libreoffice.org/37284
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:30:20 +02:00
Noel Grandin 185ed3ddb8 teach loplugin:constantparam about simple constructor calls
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9
Reviewed-on: https://gerrit.libreoffice.org/37280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:29:03 +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
Arnaud Versini 1fdb0e1897 Replace all OUString("") with OUString()
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0
Reviewed-on: https://gerrit.libreoffice.org/37146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04 08:39:18 +02:00
Noel Grandin 9348b322a5 clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a
Reviewed-on: https://gerrit.libreoffice.org/36450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28 11:23:34 +02:00
Caolán McNamara 7bd87eb30c remove xmlsecurity bitmaps from .src files
Change-Id: I4a1e272f26711e2c3a3860f3b2553467b979405c
2017-04-26 10:02:55 +01:00
Miklos Vajna db3683b43f xmlsecurity: remove no longer needed ImplXMLSignatureListener
The only remaining task it did was StartVerifySignatureElement() in
startElement(), but that can be done in OOXMLSecParser / XSecParser
easily, no need to have separate class for that.

Change-Id: I0863019d3a92a911df0d60bf872dd0978eac03d5
Reviewed-on: https://gerrit.libreoffice.org/36770
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-04-21 10:55:18 +02:00
Tor Lillqvist 43d9231f72 Don't crash without GPG
Change-Id: I31caf1b3da7400856d6ee46bd0cc4050e32b6e3a
2017-04-18 18:13:32 +03:00
Stephan Bergmann eec04f7f04 loplugin:useuniqueptr (clang-cl)
Change-Id: I32c69544b40c2398f415e3aaa9beb470694f0290
2017-04-18 08:42:02 +02:00
Miklos Vajna 611f536e0e xmlsecurity: remove unused ImplXMLSignatureListener::signatureVerified()
ImplXMLSignatureListener doesn't have to implement
XSignatureVerifyResultListener, signatureVerified() is only called at
SignatureVerifierImpl::notifyResultListener(), on an object set by
SignatureVerifierImpl::addSignatureVerifyResultListener(). But
addSignatureVerifyResultListener() is only called from
XSecController::prepareSignatureToRead() where the argument is of type
XSecController.

Change-Id: I6741e6a4ce5cf800b09189cd8b7814cd72d602ab
Reviewed-on: https://gerrit.libreoffice.org/36504
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-04-13 10:12:47 +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
Miklos Vajna 653588e1bb xmlsecurity: remove unused ImplXMLSignatureListener::signatureCreated()
ImplXMLSignatureListener doesn't have to implement
XSignatureCreationResultListener, signatureCreated() is only called at
SignatureCreatorImpl::notifyResultListener(), on an object set by
SignatureCreatorImpl::addSignatureCreationResultListener(). But
addSignatureCreationResultListener() is only called from
XSecController::prepareSignatureToWrite() where the argument is of type
XSecController.

Change-Id: I378bda8b1ffdebb4305bec9eebe093aa2443b4e7
2017-04-06 14:27:05 +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
Noel Grandin 0fe6f1a196 use actual UNO enums in vcl..xmlsecurity
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc
Reviewed-on: https://gerrit.libreoffice.org/36041
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03 11:05:13 +00:00
Samuel Mehrbrodt 87fe264212 gpg4libre: Show all keys no matter which trust level they have
Also remove the check for canEncrypt() since we also use this list for signing.

Change-Id: Ife95960f7303bebf2f61f5d3f3a37b9bb3018a5a
Reviewed-on: https://gerrit.libreoffice.org/35799
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-29 19:36:00 +00:00
Samuel Mehrbrodt 1bf940eb2b gpg4libre: One service should be enough for the dialog to work
Change-Id: I2279c39e4dddec94cb061fe9bcad06804a6d35c9
Reviewed-on: https://gerrit.libreoffice.org/35664
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-27 07:15:36 +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
Noel Grandin f059347857 loplugin:unusedfields
improve the plugin to find fields which are only assigned to in the
constructor

Change-Id: I95b5be238ebba83d950ca15093abdd1849740359
Reviewed-on: https://gerrit.libreoffice.org/35613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-24 08:57:01 +00:00
Miklos Vajna 59b091bd81 xmlsecurity: ImplXMLSignatureListener is only used with XMLSignatureHelper
So no need to go via Link, can call those member functions directly.

Change-Id: I36a5193965d23230ecc1ddca8675b3745933469d
2017-03-23 11:34:38 +01:00
Stephan Bergmann 9df97a7d65 Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
Change-Id: I0b478dfa25a54595ba0dcee1ca3ec0291ee94ef5
2017-03-22 21:26:34 +01:00
Miklos Vajna 7415b71b79 vcl: move in PDF tokenizer from xmlsecurity
The PDF code in xmlsecurity served two purposes:

- a generic PDF tokenizer
- signature verification

The first purpose is useful to have in VCL, so the PDF export code can
use it as well when it comes to PDF image handling.

This commit just moves most of the PDF code to VCL, it does not touch
the PDF export code yet. With this, also the somewhat odd xmlsecurity
dependency of CppunitTest_vcl_pdfexport can be removed as well.

Change-Id: I6fe8294ed5c4aa4d79f4b2ddef80a4d1c9d566cc
Reviewed-on: https://gerrit.libreoffice.org/35513
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22 08:03:40 +00:00
Miklos Vajna 9be498dac2 xmlsecurity: separate signature verification from PDF tokenizer
Signature verification code depends on sax and xmloff, but the rest of
the PDF tokenizer could be otherwise moved down to lower layers without
problems.

Change-Id: Ieca57279e9517935821c1d34f217fd10548035ef
Reviewed-on: https://gerrit.libreoffice.org/35512
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-21 17:02:28 +00:00
Stephan Bergmann 9871f1eee3 Make PDFDocument::ReadKeyword work at end of file
If the first ReadChar fails due to EOF, ch would be used uninitialized.  If the
second ReadChar fails due to EOF, the SeekRel(-1) shouldn't be executed.

Change-Id: Ibf99539a3a8880a77653bd7576721104f9782e36
Reviewed-on: https://gerrit.libreoffice.org/35504
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-21 13:29:42 +00:00
Miklos Vajna 302f25890b xmlsecurity: hold SAXEventKeeperImpl by rtl::Reference in XSecController
SAXEventKeeperImpl is the only implementation of the
css::xml::crypto::sax::XSecuritySAXEventKeeper interface, and this way
it's not necessary to cast to various interfaces explicitly at a lot of
places.

Change-Id: I25f76c88d5fefef42a6e8394a9d6de98c52b12c0
Reviewed-on: https://gerrit.libreoffice.org/35317
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-17 11:17:22 +00:00
Noel Grandin e6541c1abe remove unused defines from HRC files in xmlsecurity
Change-Id: I1a0cfa86708e054ecced54052085e65e847097ba
Reviewed-on: https://gerrit.libreoffice.org/35270
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17 06:04:58 +00:00
Samuel Mehrbrodt 9b6ed11d58 gpg4libre: No need to create separate idl files for gpg services
Change-Id: Ief217cd91e30433c30ac0547d28fb6eab2dc43b0
Reviewed-on: https://gerrit.libreoffice.org/35213
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-16 16:57:52 +00:00
Samuel Mehrbrodt 0ea920eeb3 No need to use a shared ptr here
Change-Id: Ia3d2f019689efe990cbbde11e9c27a80fd95ae0a
Reviewed-on: https://gerrit.libreoffice.org/35252
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-16 12:55:45 +00:00
Samuel Mehrbrodt 6bcc2e1b3c gpg4libre: More details for certificates
Change-Id: I9eee6c55d7ec27e28d844de2ed544040b07fa501
Reviewed-on: https://gerrit.libreoffice.org/35203
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-16 11:27:55 +00:00
Samuel Mehrbrodt 2237f08812 gpg4libre: Add certificate usage to gpg certificates
Change-Id: I72c83724fcbd380e477a90a3e6db32406f68899b
Reviewed-on: https://gerrit.libreoffice.org/35192
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-16 11:11:56 +00:00
Miklos Vajna 9dd836e4f6 xmlsecurity: use auto when declaring iterators
Change-Id: Ie56c0c0e1917f159957babca346f1a3fa04bc629
Reviewed-on: https://gerrit.libreoffice.org/35253
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-16 11:08:34 +00:00
Samuel Mehrbrodt fa05bf54c9 gpg4libre: Don't mark all keys as private
Only those that can sign (have a private key)

Change-Id: I1c8b553a788a14c236022c819cbc346fc4735daf
Reviewed-on: https://gerrit.libreoffice.org/35202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 14:09:19 +00:00
Samuel Mehrbrodt c1800a7b42 Fix variable names: FixedText, not FixedImage
Change-Id: I5e87305e3d4ada4b7595ab8aac55b42bc091e031
Reviewed-on: https://gerrit.libreoffice.org/35211
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 12:23:07 +00:00
Samuel Mehrbrodt 763d5df50a gpg4libre: Don't show certificate path when there is no hierarchy
Gpg private keys have no parents

Change-Id: Ie41269c3c49569ea142a01c8eef0f58a636d9eb7
Reviewed-on: https://gerrit.libreoffice.org/35208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 10:56:50 +00:00
Samuel Mehrbrodt e26b5b4fb7 gpg4libre: Improve certificate details view
* Remove SQL Syntax highlighting
* Add a vertical scrollbar if neccessary

Change-Id: Ib1de2694761ef650ccef16a5b5773c7be0602682
Reviewed-on: https://gerrit.libreoffice.org/35210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 10:35:25 +00:00
Samuel Mehrbrodt 47596612d1 gpg4libre: Show "issued to/by" only if they contain a value
Change-Id: If815c09fc6701682d6ee3e1feaf3c45ff09646aa
Reviewed-on: https://gerrit.libreoffice.org/35209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-15 09:58:31 +00:00
Stephan Bergmann fe7a5fe993 loplugin:subtlezeroinit (clang-cl)
Change-Id: I0a36bcf15fff74ed2f707608e04ad6596614dfd1
2017-03-14 14:49:58 +01:00
Andrea Gelmini f727186145 Fix typos
Change-Id: I23b16792005d66588e3439eb6482adda96c45673
Reviewed-on: https://gerrit.libreoffice.org/35064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-11 12:13:42 +00:00
Miklos Vajna 90d88b6e46 xmlsecurity: remove unused XMLEncryptionTemplateImpl
Not needed since commit 0649622956
(loplugin:unusedmethods, 2017-02-21).

Change-Id: I5e8699174202c17309198e541dc904dc1b47a534
Reviewed-on: https://gerrit.libreoffice.org/35031
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-10 11:08:22 +00:00
Samuel Mehrbrodt 6f20dd1815 gpg4libre: Remove deprecated dynamic exception specifications
Change-Id: I3bec4570149af50fad5eef33bafb9842ab598798
Reviewed-on: https://gerrit.libreoffice.org/34967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-08 10:31:47 +00:00
Caolán McNamara 3ecca2522d coverity#1402074 Resource leak
and

coverity#1402075 Resource leak
coverity#1402076 Resource leak

Change-Id: I41f2ad480a43e3563b08a6316d4e74bfe8efd378
2017-03-07 09:06:06 +00:00
Stephan Bergmann 6117ae2bd3 -Werror,-Wunused-private-field
Change-Id: I8e39763e781121932a0200e59760b49d7edcbfdd
2017-03-04 23:09:13 +01:00
Samuel Mehrbrodt 88ac77c0bc gpg4libre: List and view GPG keys
* Add GPG implementation of css::xml::crypto UNO interfaces (part of that is only stub atm)
* List gpg keys along with other certificates
* Viewing gpg certificates: Not all properties are implemented yet

Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1
Reviewed-on: https://gerrit.libreoffice.org/33843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-04 10:26:43 +00: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 62e5c2422c CertificateViewer: Don't crash with empty certificate path
gpg4libre

Change-Id: I4e3d59331a93c0bee98bcc493c2a6aca11005ec4
Reviewed-on: https://gerrit.libreoffice.org/34741
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-01 12:51:36 +00:00