/include/unotest/

stro/cib/libreoffice-6-2'>distro/cib/libreoffice-6-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/oox/source/crypto/AgileEngine.cxx
AgeCommit message (Collapse)Author
2019-08-15loplugin:sequenceloop in forms..ooxNoel Grandin
Change-Id: Id742001211e916e7709918e7112902a0c35bac95 Reviewed-on: https://gerrit.libreoffice.org/77501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini
Change-Id: Ic981076f76c92fb3112932bb7b5d97d6ec3d3c67 Reviewed-on: https://gerrit.libreoffice.org/77307 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17tdf#42949 Fix IWYU warnings in include/tools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dc920e9388f9e2aa4dcae1f0b3f7562d08f7f70 Reviewed-on: https://gerrit.libreoffice.org/61809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-07-23Fix typosAndrea Gelmini
Change-Id: I22c02c9d4e121d3cb3b68be9a5c845e9e45cc123 Reviewed-on: https://gerrit.libreoffice.org/57603 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-07oox: Handle agile encryption info "reserved" field correctlyTomaž Vajngerl
The "reserved" filed is written fter the version number major, minor which is used to identify the encryption as agile. The "reserved" field must always have the value 0x00000040. This change writes the reserved filed correctly and when encryption and when decrypting it checks the value an potentially bails out if it desn't contain the expected value. Change-Id: I2045dc64e0c6bbb3318384e25deef2ba8f41b94c Reviewed-on: https://gerrit.libreoffice.org/57140 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-02-27Switch AgileEngine::calculateHashFinal() to GetOoxHashAsVector()Eike Rathke
... to de-duplicate implementation and cut some overhead. Also, it seems UTF-16BE password was never handled. Change-Id: I46cae8516c6f2d1568aabc8d993c883f424c7d12 Reviewed-on: https://gerrit.libreoffice.org/50401 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-29ofz: avoid invalid short hashValuesCaolán McNamara
Change-Id: Ib7cd63351f4e5ed053e55fe9c5875ad92c81d762 Reviewed-on: https://gerrit.libreoffice.org/45490 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: ooxStephan Bergmann
Change-Id: I9f1cc9940f5b31370394f789ebfaddfd6d30ca61
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-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-01-12loplugin:unusedmethods unused return value in include/ooxNoel Grandin
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
2014-12-19remove operator>> and operator<< methodsNoel Grandin
in favour of ReadXXX/WriteXXX methods Change-Id: I849fd10c689fb9834ae9974e430dc337adc68755
2014-06-25remove whitespacesMarkus Mohrhard
Change-Id: Ie14ba3dcb97f20479a04538748ef2c1c9e6c5dac
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e