summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
AgeCommit message (Collapse)AuthorFilesLines
2017-11-22gpg4libre: fix warningsThorsten Behrens1-1/+1
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-03[API CHANGE] tdf#65393 Import signature line images from ooxmlSamuel Mehrbrodt1-0/+3
showing whether the signature behind the signature line is valid or not. Change-Id: Ia6cca62812019f26d55d234cac767a9b4b7c8175 Reviewed-on: https://gerrit.libreoffice.org/40980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-03xmlsecurity: can hold UriBindingHelper by rtl::ReferenceMiklos Vajna3-8/+65
... in XMLSignatureHelper and XSecController Change-Id: Ie3817684c9ed9ed8a222e3ba56c8fbc389a68071 Reviewed-on: https://gerrit.libreoffice.org/44193 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-25xmlsecurity: remove unused chainOn() argumentMiklos Vajna1-1/+1
Change-Id: Id4d4ae41eb6d667a96ce5d294dd5bf3fcf4cb686 Reviewed-on: https://gerrit.libreoffice.org/43801 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-23loplugin:includeform: xmlsecurityStephan Bergmann12-32/+32
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-10-18xmlsecurity: remove unused m_xElementStackKeeperMiklos Vajna1-39/+0
Change-Id: Ibd7d39e288a4121428e83408ce67205eab3340c6 Reviewed-on: https://gerrit.libreoffice.org/43479 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-16Make include files found through -Ixmlsecurity/incStephan Bergmann2-3/+3
...instead of implicitly next to the including file, in preparation of loplugin:includeform Change-Id: I81e3cd2dee707168064ff729f47e525b29bea43b
2017-10-13xmlsecurity: remove unused XSecController::m_xNextNodeOnSAXChainMiklos Vajna1-6/+0
Change-Id: Ic5fd625afe2ef53968b87d1382b257e3d44ce08b Reviewed-on: https://gerrit.libreoffice.org/43354 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-06xmlsecurity: last 2 params of setSAXChainConnector() is always nullptrMiklos Vajna1-4/+1
So remove them. Change-Id: Iec2430af6634608bdc8c4beff6078ccceb7a2391 Reviewed-on: https://gerrit.libreoffice.org/43182 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-05TSCP: include certificate usage in paragraph signaturesAshod Nakashian1-0/+3
Change-Id: I6f4b891a016c67051efd9033329065d7e3c8a06b Reviewed-on: https://gerrit.libreoffice.org/43022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-10-03loplugin:finalclasses in xmloffNoel Grandin1-1/+0
Change-Id: I10ffefd29b858548472a459314c7d5632324bca2 Reviewed-on: https://gerrit.libreoffice.org/43069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski3-26/+84
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-21xmlsecurity: hold SignatureCreatorImpl by rtl::ReferenceMiklos Vajna1-1/+3
Not going via UNO means explicit interface casting can be avoided. Change-Id: I4fa2db810cade787913bca222530405d8d2eb6a9 Reviewed-on: https://gerrit.libreoffice.org/42573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-10gpg4libre: add sha512 supportThorsten Behrens1-0/+2
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-06xmlsecurity: no need to have pdfio/pdfdocument.hxx as a global headerMiklos Vajna6-4/+66
Which means xmlsecurity can be again a module that has no public headers. Change-Id: I3d0b03680398f80196fac187263e770fd44ed0ed Reviewed-on: https://gerrit.libreoffice.org/41966 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-04loplugin:dyncastvisibilityStephan Bergmann1-1/+1
Change-Id: I50c89b310da84e3d6a47b18114c20b4c35628a50
2017-09-03gpg4libre: Recycle certificate selection dialog for encryptionKatarina Behrens1-1/+12
Change-Id: I699ecff1f62b3dae7ac275823c6721810589c4cf Reviewed-on: https://gerrit.libreoffice.org/41507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-01xmlsecurity: fix inconsistent param naming in interface/implementationMiklos Vajna1-1/+1
Don't talk about enumeration when it's a number. Change-Id: I756063534b38478c382eaf72829091a4e27a6c4f Reviewed-on: https://gerrit.libreoffice.org/41779 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-10xmlsecurity: work with impl directly in SignatureEngine::startEngine()Miklos Vajna4-4/+104
The only implementation of css::xml::crypto::XXMLSignatureTemplate is XMLSignatureTemplateImpl, so work with that directly instead of going via UNO. Change-Id: I85e2169a909b689620c2ce125a9653f9a6696f45 Reviewed-on: https://gerrit.libreoffice.org/40950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-08loplugin:unusedmethodsNoel Grandin1-1/+0
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-01move resmgr to unotoolsCaolán McNamara2-2/+2
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01loplugin:constparams in variousNoel Grandin1-2/+2
Change-Id: Id15f3562f42afa6c679cea3c839172557ead0395 Reviewed-on: https://gerrit.libreoffice.org/40624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:checkunusedparams more part2Noel Grandin2-10/+0
Change-Id: Ibb940c2a7098313dfa282734894b1abc1ac40bc2 Reviewed-on: https://gerrit.libreoffice.org/40489 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:checkunusedparams more part1Noel Grandin1-4/+0
seems I got one of the checks wrong, and was missing a bunch of stuff Change-Id: I2c662fc4e735f8d6cbe56c6f82906a60a580331b Reviewed-on: https://gerrit.libreoffice.org/40481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27loplugin:constparams in xmlsecurityNoel Grandin3-15/+15
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-25loplugin:unusedmethodsNoel Grandin1-27/+0
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb Reviewed-on: https://gerrit.libreoffice.org/40391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara4-34/+61
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-20Move namespace declaration to header fileSamuel Mehrbrodt1-0/+1
Change-Id: I5388d649ff3c8da0ff055f4aed6036647a123939 Reviewed-on: https://gerrit.libreoffice.org/40130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-17Fix warning for loext namespaceSamuel Mehrbrodt1-1/+0
Define the namespace near the element that's using it Change-Id: If0a135a331d4f67ef2dfe4981e93110e7a1a787a Reviewed-on: https://gerrit.libreoffice.org/40084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17gpg4libre: Wrap PGPOwner in own namespaceSamuel Mehrbrodt1-0/+1
as recommended by W3C: https://www.w3.org/TR/xmldsig-core/#sec-PGPData Change-Id: I2cc0ae24eefc9137d2e3432da1d65e44245c7616 Reviewed-on: https://gerrit.libreoffice.org/40058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17svl: move byte-array verification from vclAshod Nakashian8-138/+6
Also use comphelper::Base64 and DateTime::CreateFromUnixTime to avoid depending on sax. Change-Id: If1853f8d9481c9caa0625a111707531bbc495f75 Reviewed-on: https://gerrit.libreoffice.org/39993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand1-1/+1
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14xmlsecurity pdf verify: push_back -> emplace_backMiklos Vajna1-1/+1
And a few other similar small cleanups. Change-Id: I91c992f33f2166d1cf27cbc9def1b69965040658 Reviewed-on: https://gerrit.libreoffice.org/39928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-10tdf#108977 Show signature info also for keys we don't have locallySamuel Mehrbrodt3-2/+5
gpg4libre Change-Id: I89593224590007e61bce95c14922c08551282067 Reviewed-on: https://gerrit.libreoffice.org/39742 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-27tdf#108711 GPG key selection should only be possible for ODF >= 1.2 documentsSamuel Mehrbrodt1-0/+3
gpg4libre Change-Id: I6dbdaefddacf55c9381d156ada20cb3f25d4b3cb Reviewed-on: https://gerrit.libreoffice.org/39263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-23gpg4libre: Show certificate kind OpenPGP vs. X509 as 1 table columnKatarina Behrens1-0/+2
Shuffled the columns around a little bit Change-Id: Ib0a979458db680d712737ff997e1c3b4e4564f3f Reviewed-on: https://gerrit.libreoffice.org/38984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-22xmlsecurity: implement support for building against system-xmlsecMiklos Vajna1-1/+1
The only remaining difference is that in the system-xmlsec case we work with the default key manager, not with the one that's only added by our xmlsec patches. This works for me for the uses I know of (see <https://lists.freedesktop.org/archives/libreoffice/2017-February/076947.html> for the motivation): signing and verifying of different signatures (bad signature, good with non-trusted CA, good with trusted CA) with software-based certificates all behave as expected. Change-Id: If3f3e2b8373ab7397db3f98070a5a2ce51fa7c06 Reviewed-on: https://gerrit.libreoffice.org/39075 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-22xmlsecurity: fix loplugin:passstuffbyref warningsMiklos Vajna2-2/+2
Change-Id: I627abfe33e9c2fc4243276706c1624ce19943678
2017-06-21gpg4libre: make signature impl swappable in-situ during validationThorsten Behrens3-4/+5
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-21gpg4libre: some code improvements, add metadata for OpenPGP keysThorsten Behrens2-0/+3
Change-Id: I1beb692b9a9a34b5f0cf743ba9e4a145ac582184
2017-06-21gpg4libre: Make viewing signatures work for gpg signaturesSamuel Mehrbrodt1-0/+4
Change-Id: Ic10846cb87e23ca9ffa0eb0d64c56fcf79c73a9d
2017-06-21gpg4libre: write PGPData info, get more metadata out for gpg keyThorsten Behrens3-0/+11
Change-Id: Ia560869ec02fca7fe4219136e1fe939e13f1e4c2
2017-06-21gpg4libre: Init xmlsec in one place before creating the gpg/x509 servicesSamuel Mehrbrodt1-0/+20
Change-Id: I0308d586344b5e52ad327f6650b62ac0eac7ecb9
2017-06-21gpg4libre: Having this dllpublic should be fine now since it's in inc/Samuel Mehrbrodt1-1/+0
Change-Id: I79c132e717a62c6274eeafe33d732616cbd6a5a6
2017-06-21gpg4libre: Make signature dialog work with two signing servicesSamuel Mehrbrodt3-3/+94
Change-Id: I0b47e6dba38222bb6b4f778c4206d3b37bc93089
2017-06-21gpg4libre: share static xmlsec lib between nss and gpgThorsten Behrens1-5/+3
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-21xmlsecurity nss: adopt the private key of the signing certificate explicitlyMiklos Vajna1-0/+3
xmlsec1-customkeymanage.patch.1 of our bundled xmlsec extends xmlSecNssKeyDataX509VerifyAndExtractKey(), so that it calls xmlSecNssPKIAdoptKey() for the private key of the signing certificate. Make this explicit in xmlsecurity/ code, so we don't depend on the patched xmlSecNssKeyDataX509VerifyAndExtractKey(). This is harmless for the patched xmlsec, but it prevents this error: warn:xmlsecurity.xmlsec:26221:1:xmlsecurity/source/xmlsec/errorcallback.cxx:48: keys.c:1246: xmlSecKeysMngrGetKey() '' 'xmlSecKeysMngrFindKey' 1 ' ' warn:xmlsecurity.xmlsec:26221:1:xmlsecurity/source/xmlsec/errorcallback.cxx:48: xmldsig.c:790: xmlSecDSigCtxProcessKeyInfoNode() '' '' 45 'details=NULL' warn:xmlsecurity.xmlsec:26221:1:xmlsecurity/source/xmlsec/errorcallback.cxx:48: xmldsig.c:503: xmlSecDSigCtxProcessSignatureNode() '' 'xmlSecDSigCtxProcessKeyInfoNode' 1 ' ' warn:xmlsecurity.xmlsec:26221:1:xmlsecurity/source/xmlsec/errorcallback.cxx:48: xmldsig.c:286: xmlSecDSigCtxSign() '' 'xmlSecDSigCtxSignatureProcessNode' 1 ' ' when xmlsec is not patched. (This is needed, but not enough to build against system xmlsec.) Change-Id: I5d68a8be7aefcb529566213f9b9c2985eab6a80a Reviewed-on: https://gerrit.libreoffice.org/39023 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-16loplugin:unusedfields xmlhelp..xmlsecurityNoel Grandin1-6/+2
Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3 Reviewed-on: https://gerrit.libreoffice.org/38821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-07gpg4libre: add 'Start certificate manager' buttonKatarina Behrens1-0/+2
Change-Id: Ief3239fd1b3ff1f4e2e95e4413aa9f707f3dfb50 Reviewed-on: https://gerrit.libreoffice.org/36689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-19make string translation loading more uniformCaolán McNamara1-1/+4
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>