summaryrefslogtreecommitdiff
path: root/xmlsecurity/source
AgeCommit message (Collapse)AuthorFilesLines
2017-06-21gpg4libre: actually take key from user selectionfeature/gpg4libre-5-4Thorsten Behrens1-1/+21
Change-Id: I6b18865913492d41a8e0206a430e267fe78c553a
2017-06-21gpg4libre: make signature impl swappable in-situ during validationThorsten Behrens4-4/+30
Sadly we only know whether its a OpenPGP or X509 signature during parsing, so we need to switch the implementation mid-way Change-Id: Ib48a9da0105de62cfecda095df8c154b59ba8c40
2017-06-21wipThorsten Behrens10-77/+100
Change-Id: I1beb692b9a9a34b5f0cf743ba9e4a145ac582184
2017-06-21gpg4libre: Make viewing signatures work for gpg signaturesSamuel Mehrbrodt1-44/+47
Change-Id: Ic10846cb87e23ca9ffa0eb0d64c56fcf79c73a9d
2017-06-21gpg4libre: write PGPData info, get more metadata out for gpg keyThorsten Behrens8-68/+208
Change-Id: Ia560869ec02fca7fe4219136e1fe939e13f1e4c2
2017-06-21gpg4libre: Init xmlsec in one place before creating the gpg/x509 servicesSamuel Mehrbrodt4-50/+56
Change-Id: I0308d586344b5e52ad327f6650b62ac0eac7ecb9
2017-06-21gpg4libre: List both (x509 and gpg) existing signaturesSamuel Mehrbrodt1-3/+8
Change-Id: I57ae79f7632885bf5c5aadcad3fb5ad4a5a9413d
2017-06-21API Change or what: add certificate kind (X509 vs. OpenPGP)Katarina Behrens6-0/+22
Change-Id: I423bef41f93af9d1b78ee9795be7ec33c3c7ae0c
2017-06-21gpp impl: now use sec envThorsten Behrens1-3/+0
Change-Id: I84e4d6872aab27f5b11ec727787a2eab80ef6a66
2017-06-21gpg4libre: fix build, explicit ctor callThorsten Behrens1-2/+2
Change-Id: Iec7ca4e37d6f5c4f63aaa22acfa0bdd395747471
2017-06-21gpg4libre: Make signature dialog work with two signing servicesSamuel Mehrbrodt10-109/+79
Change-Id: I0b47e6dba38222bb6b4f778c4206d3b37bc93089
2017-06-21gpg4libre: hacked to workThorsten Behrens3-3/+40
Change-Id: Ic998ddb2aa791b2b0430f12280b1c1dc36a013d2
2017-06-21gpg4libre: initial GPG signature validationThorsten Behrens1-44/+113
Change-Id: I80afd77f74a6cb3f3fb7da03a6a4b74b132360d2
2017-06-21gpg4libre: fix gpg signature generationThorsten Behrens1-3/+15
Change-Id: I6eb95c948b6c8c9b8dee21215b430921bf454bb9
2017-06-21gpg4libre: share static xmlsec lib between nss and gpgThorsten Behrens8-6/+50
In the end, the gpgme implementation uses enough of xmlsec functionality that splitting those (and ending up with two copies) was just not worth it. Change-Id: Ida87c848e4e6a770e3c697add9ceb589a9ec3930
2017-06-07gpg4libre: add 'Start certificate manager' buttonKatarina Behrens1-1/+46
Change-Id: Ief3239fd1b3ff1f4e2e95e4413aa9f707f3dfb50 Reviewed-on: https://gerrit.libreoffice.org/36689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 28ae89f4655ee7d630f2400e3994c227dcf47f70) Reviewed-on: https://gerrit.libreoffice.org/38478 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-05-21make string translation loading more uniformCaolán McNamara3-17/+17
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2155e04d6343638ca9815d394cbc4f78c2b17c3a) drop toString Change-Id: I0f67c8931523bbe90bfbc8cc7d9a5bd523758ee5 (cherry picked from commit 8b1101023f01b2c7478a014b5ead73ada4fd4861) pNameResId is unused Change-Id: Ic1fe6abc7066517187695266c4d1a0888b41ffe7 (cherry picked from commit c2667d7ff558a1b7bf83e694909465f00d1a16f6) Reviewed-on: https://gerrit.libreoffice.org/37843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-19tdf#107782 xmlsecurity PDF verify: handle empty X509 certificateMiklos Vajna1-1/+2
Leaving Signer as an empty reference will do exactly what we want: the signature will be considered invalid. (cherry picked from commit 18aa83acfa243741eb4c79a2e11aec6eaf1a9f02) Change-Id: I25d7cbd260384110173fe953fc24f3dcf6b9acd5 Reviewed-on: https://gerrit.libreoffice.org/37803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-18gpg4libre: fix windows buildThorsten Behrens8-22/+22
Change-Id: I66b809bbf2f5ab5d9c1eaf40ba8f2c91f4bc8007
2017-05-18gpg4libre: initial GPG signature generationThorsten Behrens17-275/+522
* takes XML-Sec signature template * calculates digest for all added reference streams * produces signature value over canonicalized signature template * writes same as detached signature into template, streams that out Change-Id: I303e080dc25c440175fe1ae897f03cf356d5d0f2 Reviewed-on: https://gerrit.libreoffice.org/36106 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-05-17xmlsecurity: use xmlsec API instead of patching out cert verificationMiklos Vajna2-0/+6
This flag does exactly what we need since xmlsec-1.2.24. Change-Id: I3ae052d4bfe564c3234aef2511ef82ebdb452ebe Reviewed-on: https://gerrit.libreoffice.org/37700 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-12remove unused uno::Reference varsNoel Grandin2-2/+0
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-11gpg4libre: we really only want private keys listedThorsten Behrens1-11/+4
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-11Clean up uses of SAL_U/SAL_W: xmlsecurityStephan Bergmann2-15/+15
Change-Id: I96043623a5b0e26ddc44de5c71743f3b0d8e1e50
2017-05-10xmlsecurity: slightly more modern c++Thorsten Behrens1-39/+24
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-10xmlsecurity/source/framework: un-screw-up indentThorsten Behrens2-83/+83
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-08loplugin:checkunusedparams in xmlsecurityNoel Grandin3-4/+4
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-08teach loplugin:constantparam about simple constructor callsNoel Grandin3-6/+3
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-07revert OSL_ASSERT changesChris Sherlock10-16/+16
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assertChris Sherlock10-16/+16
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
2017-05-04Replace all OUString("") with OUString()Arnaud Versini1-1/+1
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-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin2-9/+3
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-26remove xmlsecurity bitmaps from .src filesCaolán McNamara3-10/+2
Change-Id: I4a1e272f26711e2c3a3860f3b2553467b979405c
2017-04-21xmlsecurity: remove no longer needed ImplXMLSignatureListenerMiklos Vajna8-164/+22
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-18Don't crash without GPGTor Lillqvist1-0/+3
Change-Id: I31caf1b3da7400856d6ee46bd0cc4050e32b6e3a
2017-04-18loplugin:useuniqueptr (clang-cl)Stephan Bergmann1-11/+10
Change-Id: I32c69544b40c2398f415e3aaa9beb470694f0290
2017-04-13xmlsecurity: remove unused ImplXMLSignatureListener::signatureVerified()Miklos Vajna2-12/+0
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 Gelmini1-1/+0
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-06xmlsecurity: remove unused ImplXMLSignatureListener::signatureCreated()Miklos Vajna2-10/+0
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 Bergmann2-5/+5
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 Grandin1-1/+1
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 Mehrbrodt1-1/+1
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 Mehrbrodt1-1/+1
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 Gelmini4-4/+4
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 Grandin2-3/+1
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 Vajna3-26/+12
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 Bergmann1-1/+2
Change-Id: I0b478dfa25a54595ba0dcee1ca3ec0291ee94ef5
2017-03-22vcl: move in PDF tokenizer from xmlsecurityMiklos Vajna2-2938/+48
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 Vajna2-2/+2
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 Bergmann1-1/+3
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>