summaryrefslogtreecommitdiff
path: root/xmlsecurity
AgeCommit message (Collapse)Author
2017-07-21migrate to boost::gettextCaolán McNamara
* 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 Mehrbrodt
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-20xmlsecurity mscrypt: turn akmngr patch into plain codeMiklos Vajna
This is just a set of C functions accessing public libxmlsec API, it's perfectly OK to have this in xmlsecurity/ instead of patching the bundled libxmlsec for this. Change-Id: Ib3e746883a47b80626fdcd64149ce50aa0588395 Reviewed-on: https://gerrit.libreoffice.org/40209 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-19[API CHANGE] offapi: remove unused css.xml.crypto.XMLEncryptionMiklos Vajna
This is mostly just the offapi/ part, more C++ code can be removed in xmlsecurity/ after this. XMLEncryption wasn't used by internal code since it was added in commit 9f34fde7a8750b856570b5e855d2ecb226bf0c23 (libxmlsec, 2004-07-12). It seems to be unlikely that this non-published service was used by 3rd-party code, since it was specific to other xmlsecurity/ code, not generic functionality that could be useful in other contexts. Change-Id: Ia0168f67d1c8ff7a019760ac436511f219eee94e Reviewed-on: https://gerrit.libreoffice.org/40162 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-18coverity#1415512 silence Unchecked return valueCaolán McNamara
Change-Id: I50601be72a5f496c1d1e8135af57db649e29110a
2017-07-18Fix typosAndrea Gelmini
Change-Id: If6023dfa1d90f79185197622a738373a189ea6af Reviewed-on: https://gerrit.libreoffice.org/40118 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-18We no longer patch libxmlsec for thisSamuel Mehrbrodt
Change-Id: I0e817499e80d2b7292833f5e734974b05ef579b6 Reviewed-on: https://gerrit.libreoffice.org/40041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-07-17Fix warning for loext namespaceSamuel Mehrbrodt
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-17This should be a namespace, not an attribute "namespace"Samuel Mehrbrodt
Change-Id: I159db32662679a3194edf942fa6672370e2b8587 Reviewed-on: https://gerrit.libreoffice.org/40072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-07-17gpg4libre: Import public key payload if verification result != validKatarina Behrens
it is essential to look closer at the results of verification (code doing that was removed by commit bdbebda1d80f538f946b14042) to be able to proceed with importing public key payload from the file if needed I've also killed one more instance of xmlStrlen being used on binary data Change-Id: I8cd45fe963c8dde91727471ddbebe6943374a121 Reviewed-on: https://gerrit.libreoffice.org/40066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17loplugin:unnecessaryparen: xmlsecurity (clang-cl)Stephan Bergmann
Change-Id: Iaef0f4dda4ea4cb2d3bb67d9007873c89b9aa5c5
2017-07-17gpg4libre: Wrap PGPOwner in own namespaceSamuel Mehrbrodt
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-17gpg4libre: use full SHA1 hash for key identificationThorsten Behrens
Read and write full 20 bytes/40 hex chars of SHA1 key hash, instead of some abridged versions. See also https://lists.debian.org/debian-devel/2016/08/msg00215.html Change-Id: I741afc94ac7cf559880fe55ff02420723e13310d Reviewed-on: https://gerrit.libreoffice.org/40027 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17gpg4libre: unconditionally use binary IOThorsten Behrens
Regardless of changing gpgme defaults, we don't want ascii armor anywhere. Change-Id: Ic1e80e134b8f24d05d6549ef19c5a82220718f1f Reviewed-on: https://gerrit.libreoffice.org/40022 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17gpg4libre: search for _all_ local keys in getCertificate()Thorsten Behrens
Otherwise, newly-imported ones will not show up, which is bad when trying to figure out how much we trust a key in DocumentDigitalSignatures::ImplVerifySignatures() Change-Id: I771cf71b5e0ddb5cc76db94d7ada4c5291fe56f1 Reviewed-on: https://gerrit.libreoffice.org/40023 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-17svl: move byte-array verification from vclAshod Nakashian
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: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
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-14tdf#108831 PGP signature shown as invalidSamuel Mehrbrodt
It was valid, but not trusted. We need to show the owner trust in another place. gpg4libre Change-Id: I344a7b064a22c16b647c73d52f7abd91cfc86be9 Reviewed-on: https://gerrit.libreoffice.org/39826 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-14gpg4libre: Show whether pgp keys are trusted or notSamuel Mehrbrodt
Owner trust levels considered valid keys: Marginal Full Ultimate Owner trust levels considered invalid keys: Unkown Undefined Never Change-Id: I7338b587acfd105ca24e40b45960cea8d2c04ded Reviewed-on: https://gerrit.libreoffice.org/39952 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-14gpg4libre: Don't use xmlStrlen on binary dataKatarina Behrens
Odd things happen inside gpgme if the buffer is prematurely truncated due to \n char and valid signature is then evaluated as invalid Change-Id: I24d4d22af06a3dde6eb7fdfc12953cf1b5f19c1e Reviewed-on: https://gerrit.libreoffice.org/39945 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14xmlsecurity pdf verify: push_back -> emplace_backMiklos Vajna
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-12strip some linefeeds from the end of debug outputNoel Grandin
Change-Id: I2821969d86b7f8cee53404e6a0acfbebbe53b3ac Reviewed-on: https://gerrit.libreoffice.org/39824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10tdf#109046 Show correct signature type for OpenPGPSamuel Mehrbrodt
gpg4libre Change-Id: I9c05f68e16928d14a29058f5bb9aa35c90b8f48b Reviewed-on: https://gerrit.libreoffice.org/39744 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-10Related tdf#108977 Fix crash when vieweing non-existing certificateSamuel Mehrbrodt
gpg4libre Change-Id: If72c2ee818b67b48753ee293de4f02b4832b9d96 Reviewed-on: https://gerrit.libreoffice.org/39743 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-10tdf#108977 Show signature info also for keys we don't have locallySamuel Mehrbrodt
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-07-06use OString::operator== in preference to ::equalsNoel Grandin
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03loplugin:oncevar (clang-cl): xmlsecurityStephan Bergmann
Change-Id: Ic5e4dac2626474dd3d44ef5097522bc7e2207cd1
2017-07-02xmlsecurity: avoid crash on empty security contextThorsten Behrens
This should prevent 8cf224c2-f9b9-44e1-9cb0-fc452e570886 Change-Id: I1ad4d8437923eb677d574c2c469cc62378c9c7a6 Reviewed-on: https://gerrit.libreoffice.org/39430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-06-30loplugin:staticmethodsStephan Bergmann
Change-Id: I68d02b89a2c55e41ad0d86392ed3994fa5410fac
2017-06-29loplugin:oncevar variousNoel Grandin
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6 Reviewed-on: https://gerrit.libreoffice.org/38766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-28Fix typosAndrea Gelmini
Change-Id: I59777c29fe20f112327ce28a1c0b9cdd2f60857c Reviewed-on: https://gerrit.libreoffice.org/39354 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-28gpg4libre: Don't call production code inside an assert()Samuel Mehrbrodt
Won't work in non-debug builds Change-Id: I64f9c416890ddd02ec8efc0f59ded145cc17896a Reviewed-on: https://gerrit.libreoffice.org/39345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-28tdf#108794 gpg4libre: Use key id to get the right keySamuel Mehrbrodt
Change-Id: I5950d192e19e652cbb7680db426bfbd28907a1cb Reviewed-on: https://gerrit.libreoffice.org/39308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-28tdf#108798 Make CanSignWithGPG work with PDF docsSamuel Mehrbrodt
Change-Id: I09aa030bed3d6ce51ef71d8bab905b01fab5b699 Reviewed-on: https://gerrit.libreoffice.org/39309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-27gpg4libre: Show message when no cert manager foundSamuel Mehrbrodt
Change-Id: I0da5f20b049ab2d8c992cb2a04dcf544f0b35aa1 Reviewed-on: https://gerrit.libreoffice.org/39289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-27gpg4libre: Add seahorse to list of certificate managersSamuel Mehrbrodt
which is the Gnome default app for ḱey management Change-Id: I4c27074f83538640fb1729c5cfddd96981d35f40 Reviewed-on: https://gerrit.libreoffice.org/39288 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-27tdf#108711 GPG key selection should only be possible for ODF >= 1.2 documentsSamuel Mehrbrodt
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-27gpg4libre: Show error message when signing failsSamuel Mehrbrodt
Change-Id: I58f3febaaaaa225952e87ad3f092950ace37d15d Reviewed-on: https://gerrit.libreoffice.org/39283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-26Remove nonsense TODOSamuel Mehrbrodt
Change-Id: I97fd74c664e125f6c04f585e20c84ce702927e50 Reviewed-on: https://gerrit.libreoffice.org/39277 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-26Cleanup commentSamuel Mehrbrodt
Change-Id: I218675bcb832c158171f87bb7c52a658ceaa7a67 Reviewed-on: https://gerrit.libreoffice.org/39278 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-25gpg4libre: import public key payload if initial validation failsThorsten Behrens
Since maybe we don't know the key yet? Change-Id: I8b7e3f472d4731d9fb8bb675d81bdad257aa9230 Reviewed-on: https://gerrit.libreoffice.org/39194 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-25gpg4libre: save some space, extract binary key/sign dataThorsten Behrens
Since callers will base64-encode this anyway, again Change-Id: I0962d102fa0f2b95eaa2e608539cc291125f0321 Reviewed-on: https://gerrit.libreoffice.org/39193 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-25gpg4libre: base64-encode and decode SignatureValueThorsten Behrens
which xmldsig-core actually requires Change-Id: I92a6e192865919d844009be042dad36106a19fc8 Reviewed-on: https://gerrit.libreoffice.org/39192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-24gpp4libre: error handling, proper key extractionThorsten Behrens
Change-Id: I1cb219f825393309219a4ebfb406482050b91228 Reviewed-on: https://gerrit.libreoffice.org/39191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-23XMLSignature_GpgImpl: Use cppu::supportsServiceSamuel Mehrbrodt
Change-Id: Ic093462c957aa445aab43f95ac22af3a3df1d709
2017-06-23XMLSignature_GpgImpl: Clean up namespacesSamuel Mehrbrodt
Change-Id: I34aa59171b5d440bdd6bdec80badf7a3eb42bd3f
2017-06-23Gpg key listing: Use range based for loopSamuel Mehrbrodt
Change-Id: Idc7b39f751b2572f5ddd077aaad86a1f7b4b9a5d