summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)Author
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21xmlsecurity: remove no longer needed ImplXMLSignatureListenerMiklos Vajna
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-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-18Don't crash without GPGTor Lillqvist
Change-Id: I31caf1b3da7400856d6ee46bd0cc4050e32b6e3a
2017-04-18loplugin:useuniqueptr (clang-cl)Stephan Bergmann
Change-Id: I32c69544b40c2398f415e3aaa9beb470694f0290
2017-04-14vcl PDF import: don't assume larger offset -> newer trailerMiklos Vajna
Usually when the PDF file contains incremental updates the updates are appended at the end of the document. But this is not required, the various trailers can be in any order. Make sure that we look at the last trailer (logically last, not the one with the largest file offset) when looking for pages. Change-Id: Idcd85a7c6bbf08c9436dd73933d79cdb683f482c Reviewed-on: https://gerrit.libreoffice.org/36527 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-13xmlsecurity: remove unused ImplXMLSignatureListener::signatureVerified()Miklos Vajna
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-13Removed duplicated includesAndrea Gelmini
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-12can use gb_CppunitTest_use_configuration and still access .ui filesCaolán McNamara
after... commit 506cab1a01b0481d0831a7a692a26dc5a5b55e91 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Apr 12 16:14:10 2017 +0100 take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258 Change-Id: I906d16037cdf0b9203a4120cb1a5e9846a5c7b7f Reviewed-on: https://gerrit.libreoffice.org/36482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-10remove reference to deleted files in pchMarkus Mohrhard
Change-Id: I1c51cc094dae710abd0d13169f5c0973908c13d8 Reviewed-on: https://gerrit.libreoffice.org/36355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: xmlsecurityStephan Bergmann
Change-Id: I51692b887585d6a64019550aff5f6ea2910ad2fd
2017-04-06xmlsecurity: remove unused ImplXMLSignatureListener::signatureCreated()Miklos Vajna
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-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann
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-03use actual UNO enums in vcl..xmlsecurityNoel Grandin
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-03-29gpg4libre: Show all keys no matter which trust level they haveSamuel Mehrbrodt
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-27gpg4libre: One service should be enough for the dialog to workSamuel Mehrbrodt
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-25Fix typosAndrea Gelmini
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-24loplugin:unusedfieldsNoel Grandin
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-23xmlsecurity: ImplXMLSignatureListener is only used with XMLSignatureHelperMiklos Vajna
So no need to go via Link, can call those member functions directly. Change-Id: I36a5193965d23230ecc1ddca8675b3745933469d
2017-03-22Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)Stephan Bergmann
Change-Id: I0b478dfa25a54595ba0dcee1ca3ec0291ee94ef5
2017-03-22vcl: move in PDF tokenizer from xmlsecurityMiklos Vajna
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-21xmlsecurity: separate signature verification from PDF tokenizerMiklos Vajna
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-21Make PDFDocument::ReadKeyword work at end of fileStephan Bergmann
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-19Fix typosAndrea Gelmini
Change-Id: I5c89a47e658ae4ad2b0cdfcdb4988c4b79353085 Reviewed-on: https://gerrit.libreoffice.org/35413 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17xmlsecurity: hold SAXEventKeeperImpl by rtl::Reference in XSecControllerMiklos Vajna
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-17remove unused defines from HRC files in xmlsecurityNoel Grandin
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-16gpg4libre: No need to create separate idl files for gpg servicesSamuel Mehrbrodt
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-16No need to use a shared ptr hereSamuel Mehrbrodt
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-16gpg4libre: More details for certificatesSamuel Mehrbrodt
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-16gpg4libre: Add certificate usage to gpg certificatesSamuel Mehrbrodt
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-16xmlsecurity: use auto when declaring iteratorsMiklos Vajna
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-15gpg4libre: Don't mark all keys as privateSamuel Mehrbrodt
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-15Fix variable names: FixedText, not FixedImageSamuel Mehrbrodt
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-15gpg4libre: Don't show certificate path when there is no hierarchySamuel Mehrbrodt
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-15gpg4libre: Improve certificate details viewSamuel Mehrbrodt
* 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-15gpg4libre: Show "issued to/by" only if they contain a valueSamuel Mehrbrodt
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-14loplugin:subtlezeroinit (clang-cl)Stephan Bergmann
Change-Id: I0a36bcf15fff74ed2f707608e04ad6596614dfd1
2017-03-11Fix typosAndrea Gelmini
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-10gpgme: change gb_LinkTarget__use_gpgmepp to depend on packageMichael Stahl
This replaces f764d67da42caa71fd5e02146b1ca32680ae2f6e with a better fix, no point in littering the makefiles with manual dependencies when we can just avoid the problem in one place with a tiny performance cost. Change-Id: Ic7e91ee4c99deb12a9544cf691c0995de6ae2bad
2017-03-10xmlsecurity: remove unused XMLEncryptionTemplateImplMiklos Vajna
Not needed since commit 0649622956431e0a1955cb80d1175025401ab5e5 (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-08gpg4libre: Remove deprecated dynamic exception specificationsSamuel Mehrbrodt
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-07coverity#1402074 Resource leakCaolán McNamara
and coverity#1402075 Resource leak coverity#1402076 Resource leak Change-Id: I41f2ad480a43e3563b08a6316d4e74bfe8efd378
2017-03-05Fix Executable_pdfverify dependencies on LinuxStephan Bergmann
Change-Id: Idf5561baaa714834e8e763e379a79d084e21dc80
2017-03-04-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I8e39763e781121932a0200e59760b49d7edcbfdd
2017-03-04-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: Id846ace3c16719b4ce5f1c9e24b7f76cc7753683
2017-03-04Fix build for mobileThorsten Behrens
Change-Id: I2f133306b57798e2e828c4bd504a795331bdaf34
2017-03-04Fix build for mobileThorsten Behrens
Change-Id: I420035cec4f3d5f56363eab1fabff5c053c60cd6
2017-03-04gpg4libre: List and view GPG keysSamuel Mehrbrodt
* 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-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-02xmlsecurity: avoid using the SerialNumberAdapter wrapperMiklos Vajna
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>