summaryrefslogtreecommitdiff
path: root/include/oox/crypto
AgeCommit message (Collapse)Author
2023-08-31tdf#156835 - FILEOPEN XLSX: add SHA-384 encryption support for ooxml importBalazs Varga
Password protected file with SHA-384 encryption does not open before this patch. Change-Id: I482233f788b8e9da210ad6d2a6c4ece18d05d248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156282 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 9254fbce6b9e20a75aa2a379bcf2fc9dc41a5b44) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156225
2022-09-28use more string_view in ooxNoel Grandin
Change-Id: Ib0d7015a898073d51ac2638d62a19eadcba37685 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-02clang-tidy modernize-pass-by-value in ooxNoel Grandin
Change-Id: Ia553a24693f2ffc0f580c9869b82f0d01a1a0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-10Missing includeStephan Bergmann
(for std::unique_ptr, with recent libstdc++ 12 trunk) Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-19compact namespace: ooxNoel Grandin
Change-Id: I9ea016adcec334437da45296ee325453347836ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-13tdf#42949 Fix IWYU warnings in include/[a-r]*/*hxxGabor Kelemen
Recheck after 7-0 branchoff Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7f5c35474b671facbda85a9538462dd4291add91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97655 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-07make some symbols privateNoel Grandin
Change-Id: I224831ad18e754fd67d9b16510cd286a5397f1f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-26-Werror,-Wunused-private-fieldStephan Bergmann
...since b9353394f46e46485fd148f2842f0c1e8e5322e3 "[MS-OFFCRYPTO] convert oox implementation into UNO service" Change-Id: I0f226858ef9a1195fb26c1afe6c904d7cef6f541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94813 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-25[MS-OFFCRYPTO] convert oox implementation into UNO serviceVasily Melenchuk
To permit pluggable crypto services, abstract existing implementation behind an XPackageEncryption API. Previous code already had two halfway-polymorphic classes (agile and standard 2007 engine), so we're not adding much additional layers. As MS crypto always uses OLE storage to wrap content into one single file, current implementation passes all substorage names down into XPackageEncryption APi, so different downstream implementations (e.g. for MS RMS, or Azure AIP) are possible. Because OleStorage classes are internal to LibO core, access is provided via XInput/XOutput stream API function. Change-Id: Icc32a4e0ce215090c3b739f1dcaa0654b36b7f08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84436 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-03use more compact namespace syntax in /includeNoel Grandin
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12Revert "loplugin:constfields in oox"Noel Grandin
This reverts commit a84e3df74eecc8778e3d5be5dd80ad4ddb511edf. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: I7b45b7ead281cf3a9202ca6aabc55ee5033e5331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90332 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22make some classes module-privateNoel Grandin
Change-Id: If7303a082e06f6937fca911c578a40475546cda2 Reviewed-on: https://gerrit.libreoffice.org/83442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-29loplugin:finalclasses in ooxNoel Grandin
Change-Id: I95f69d99194f91851b2ef86bebf20006fa32fef3 Reviewed-on: https://gerrit.libreoffice.org/81656 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17tdf#42949 Fix IWYU warnings in include/ooxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I89303217fd1141b2cfe248e5e6c0818ba01cf9d9 Reviewed-on: https://gerrit.libreoffice.org/75178 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-15loplugin:constfields in ooxNoel Grandin
Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439 Reviewed-on: https://gerrit.libreoffice.org/61728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13loplugin:returnconstant in oox,packageNoel Grandin
Change-Id: I1dade7ddde6b1e226861d32f24f65be5bb9d9352 Reviewed-on: https://gerrit.libreoffice.org/58880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-09loplugin:unusedmethodsNoel Grandin
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c Reviewed-on: https://gerrit.libreoffice.org/58738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23loplugin:unusedfieldsNoel Grandin
Change-Id: I1827262ad95942cacff589929f9436f8383cf142 Reviewed-on: https://gerrit.libreoffice.org/57642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-07Use agile encryption with AES256 and SHA512 by defaultTomaž Vajngerl
Change-Id: I4dcf05a7018f8e15063a20512f4c0b673a62f1de Reviewed-on: https://gerrit.libreoffice.org/57141 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-06oox: Agile encryption and data integrity verificationTomaž Vajngerl
This adds agile encryption for OOXML documents. Previously we always used the standard encryption used in MSO 2007 for max. compatibility, but new MSO versions (2010+) use the agile encryption, which allows more strong encryption methods (AES256 with SHA512). With this change we can now use do AES128 with SHA1 or AES256 with SHA512 encryption. In addition the agile encryption has data verification with HMAC hashing. With this change we also now write the data verification hash into the encrypted document and in addition also do data verification when opening / decrypting a document, so to make sure the document is not corrupted. Change-Id: Ib45d397df228c355941eefb76d51e5d6f8925470 Reviewed-on: https://gerrit.libreoffice.org/56974 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-06oox: move reading of the encryption info into the crypt engineTomaž Vajngerl
Change-Id: I92345cd8a0f9fc9172ae087e1bc1a16afdd67d8a Reviewed-on: https://gerrit.libreoffice.org/56972 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-07-06CryptoTools: add HMAC, move crypto impl. details to CryptoImplTomaž Vajngerl
Change-Id: I8edb24ee5d9595ef54bd49526b631baf8a7415b1 Reviewed-on: https://gerrit.libreoffice.org/56970 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-06-22oox: encryption/decryption test for Standard2007EngineTomaž Vajngerl
Change-Id: I8de25182c40004edffad4452179f191a75f130d9 Reviewed-on: https://gerrit.libreoffice.org/56300 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-31loplugin:constparams in ooxNoel Grandin
Change-Id: I43984b4ece82da39ca61a91fa14e4660298509dd Reviewed-on: https://gerrit.libreoffice.org/40581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-29replace oox internal hashing code with new comphelper codeMarkus Mohrhard
Change-Id: I0e9363f6aa6f9d1011bc917645122408f9728ca2 Reviewed-on: https://gerrit.libreoffice.org/36794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-30oox: clean-up crypto classes, use c++11 featuresTomaž Vajngerl
- remove "using namespace std;" - &vector[0] to vector.data() - use nullptr in OPENSSL Change-Id: Ib4067b0256801f94d448bc8d3faf5a2902d694e5 Reviewed-on: https://gerrit.libreoffice.org/33629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-08loplugin:unnecessaryvirtual in hwpfilter..rscNoel Grandin
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868 Reviewed-on: https://gerrit.libreoffice.org/30661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21move some useful header information to mscodec for reuseCaolán McNamara
Change-Id: Ic7adf3ed3c8279cc93a06975d6fb337210d1af87
2016-10-21hash len isn't going to change depending on who implements itCaolán McNamara
Change-Id: Iee585cba4acad74c11d083085153e2af96c8894f
2016-10-20clarify hash lengths a bit moreCaolán McNamara
Change-Id: I66cea4b9efb82d29e6c052ac11a6f2eaca823ce0
2016-10-20hash len is 20 for xls cryptoapi configurationCaolán McNamara
Change-Id: I6e06b8578959b8147043179db57e875b1d98d57d
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I19eaebdb25db8881d84625a4b9d0df0a588aab4f
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28tdf#42949: prefer including Reference.hxx over Reference.h...Jorenz Paragas
...and so on for Any.hxx and Sequence.hxx. This commit follows up on two of my previous commits, which are 6a4a15c87c03feffb90cc416ce22d2819e41442d and 474eca1f9b42749665bbf69f6dc62c66ea4ad7fd. Many non-static inline functions that are declared in Reference.h and similar files are not defined in the .h file, but their definitions are in the corresponding .hxx files instead. Thus, let's prefer including the .hxx files over the .h one so that we don't include inline functions without their definitions. In practice, the corresponding .hxx file is included transitively from many other places, but it's better not to rely on that. Change-Id: I3bada39eb879ae736c0360f435b16cd5a61adba8 Reviewed-on: https://gerrit.libreoffice.org/24456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-26tdf#42949: clean up includes in include/oox/crypto with iwyuJorenz Paragas
The includes in CryptTools.hxx that are within #if/#endif directives are not altered. iwyu suggested replacing the includes for nss.h, pk11pub.h, and sechash.h with hasht.h, pkcs11t.h, seccomon.h, and secmodt.h. I decided not to because it might make CryptTools.hxx harder to refactor in exchange for little gain. Before creating this commit, I ran 'make check' after passing --with-tls=openssl to ./autogen.sh to ensure that building with either OpenSSL or NSS (the default except on iOS and Android) works. Change-Id: I20260d18f073ffd8077bbcc597e7a8e4954e2ec5 Reviewed-on: https://gerrit.libreoffice.org/24386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11clang-tidy performance-unnecessary-value-param in ooxNoel Grandin
Change-Id: I1ac86906ea21c00f8d77834c94583be7d9e9974e
2016-01-12loplugin:unusedmethods unused return value in include/ooxNoel Grandin
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
2015-11-24loplugin:unusedfields in include/oox/Noel Grandin
Change-Id: Ie7a53f3ecc05d1d4f6f71aa8165315f9155c60dc
2015-10-23com::sun::star->css in include/linguistic to include/sfx2Noel Grandin
Change-Id: Id69e293fda98ee6cf2cc3d3296a0cd2e06bd847e Reviewed-on: https://gerrit.libreoffice.org/19527 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-06loplugin:unusedmethodsNoel Grandin
Change-Id: I150baadc442e57ee604563bc52965daa9d2e41af
2015-07-21loplugin:unusedmethods ooxNoel Grandin
Change-Id: I5381e0da0efc1f951e248cfcfb35fc680ace94e4 Reviewed-on: https://gerrit.libreoffice.org/17225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-05loplugin:staticmethodsNoel Grandin
Change-Id: I384a5e60f4b7b2f479c89ef97630519059ab720f
2015-03-19loplugin:constantfunction: ooxNoel Grandin
Change-Id: Iec2bc991821aed8da4427c6efc4ec8df72554923
2015-02-16boost::foo_ptr->std::foo_ptrCaolán McNamara
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae