summaryrefslogtreecommitdiff
path: root/include/oox/crypto/AgileEngine.hxx
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30tdf#156835 - FILEOPEN XLSX: add SHA-384 encryption support for ooxml importBalazs Varga1-0/+1
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>
2020-07-19compact namespace: ooxNoel Grandin1-4/+2
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-05-25[MS-OFFCRYPTO] convert oox implementation into UNO serviceVasily Melenchuk1-3/+3
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-03-12Revert "loplugin:constfields in oox"Noel Grandin1-9/+9
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-10-29loplugin:finalclasses in ooxNoel Grandin1-1/+1
Change-Id: I95f69d99194f91851b2ef86bebf20006fa32fef3 Reviewed-on: https://gerrit.libreoffice.org/81656 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:constfields in ooxNoel Grandin1-9/+9
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 Grandin1-1/+1
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 Grandin1-2/+0
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c Reviewed-on: https://gerrit.libreoffice.org/58738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-06oox: Agile encryption and data integrity verificationTomaž Vajngerl1-13/+75
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ž Vajngerl1-0/+2
Change-Id: I92345cd8a0f9fc9172ae087e1bc1a16afdd67d8a Reviewed-on: https://gerrit.libreoffice.org/56972 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-01-30oox: clean-up crypto classes, use c++11 featuresTomaž Vajngerl1-16/+12
- 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-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann1-1/+1
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-04-26tdf#42949: clean up includes in include/oox/crypto with iwyuJorenz Paragas1-0/+9
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-01-12loplugin:unusedmethods unused return value in include/ooxNoel Grandin1-4/+4
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-4/+4
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-05-05loplugin:staticmethodsNoel Grandin1-1/+1
Change-Id: I384a5e60f4b7b2f479c89ef97630519059ab720f
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin1-1/+1
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann1-4/+4
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2013-11-09fdo#65108 inter-module includes <>Norbert Thiebaud1-2/+2
Change-Id: Ie672de68f6a87713a379e794fa3ad255ad52a71e
2013-10-23fixincludeguards.sh: include/o*Thomas Arnhold1-2/+2
Change-Id: Ibd5d8af00f6582d53231c76e2b04e737b5804497
2013-08-24Convert vector block* to const array block*.Tomaž Vajngerl1-1/+2
Looks like my compiler eats a lot of things thrown at him but others don't. Change-Id: If1d080a545e6c2a17e19b389eeb1714aa0569644
2013-08-24fdo#35422 Support to open encrypted Office 2010 and 2013 formatsTomaž Vajngerl1-0/+81
Additionally encryption and decryption has been refactored. 2 engines have been added: AgileEngine and Standard2007Engine, which contain core functions for encryption and decryption. Standard2007Engine refers to encryption and decryption as used in Office 2007 and AgileEngine refers to encryption and decryption as used in Office 2010 and 2013. AgileEngine does not yet support encryption. Change-Id: Ica1d4d5a109fb204012b92a0c39325fe0b99b793