Age | Commit message (Collapse) | Author |
|
... to init the Version property.
The problem is that the outer storage loaded from a wholesome ODF
encrypted document doesn't have a Version, because it doesn't (directly)
contain a document and has no "/" file-entry.
Extract the root element's package version attribute and use it.
The Storage API doesn't distinguish much between the package version and
the root document's (i.e. root folder's) version.
Change-Id: I0fd5f999e9adee674d73fc542402512d0e204897
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161897
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
... standard namespace too.
Change-Id: I46804795da2009dfd8bb95b9286933728a132e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161785
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
1. ManifestImport should attach KeyInfo to the first file-entry, not to
a "/" entry which may not exist or may be preceded by another
file-entry which requires the KeyInfo to decrypt
(regression from commit 91f35f22f0447769c08ca89e27a39b40df18fffa)
2. manifest:key-size on manifest:key-derivation is unfortunately
specified to have a default value of 16, but with AES256 the actual
size is 32, and for GPG the ManifestExport forgot to export it
Change-Id: I05dd2c9e219ba7f20ba33bf0b35d47a9e3df74cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161072
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
https://www.rfc-editor.org/rfc/rfc9106.html
* add css::xml::crypto::KDFID constant group
* add "KeyDerivationFunction" to setEncryptionAlgorithms sequence
* Argon2 is used by default for wholesome ODF encryption, but
$LO_ARGON2_DISABLE can be set to use PBKDF2
* extend various structs in package
* use 3 new ODF attributes "loext:argon2-iterations" "loext:argon2-memory"
"loext:argon2-lanes" to store the arguments
* use this URL for now:
"urn:org:documentfoundation:names:experimental:office:manifest:argon2id"
* use default arguments according to second recommendation from "7.4.
Recommendations" of RFC9106; 64 MiB RAM should hopefully not be too
much even for 32 bit builds
Change-Id: I683118cc5e0706bd6544db6fb909096768ac9920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
AEAD provides the verification of the password automatically, by reading
the entire stream the tag at the end will be verified.
The existing attributes manifest:checksum-type/manifest:checksum leak
information about the plain text.
This was mitigated with the addChaffWhenEncryptedStorage() functions
(see commit f57baefbd3c4c5d8e5ec28e8702c91d60ffc5de2) but a better
solution that also works for non-XML streams is to simply omit the
attributes; authenticated encryption provides better verification
without any leak.
* "ChecksumAlgorithm" property can be set to void now to remove the
checksum
* change a bunch of members in EncryptionData, ZipPackage,
ZipPackageStream to optional
* change ZipFile::checkValidPassword() to open the stream and return it
Change-Id: Id95288d0c238c4f9940fc5a185df814e8edcbad3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160711
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
... and use it in the new experimental ODF encryption mode.
https://www.w3.org/TR/xmlenc-core1/#sec-AES-GCM
Unfortunately it turned out that NSS PK11_CipherOp() does not work with
CKM_AES_GCM because it is initialized with "context->multi = PR_FALSE"
in sftk_CryptInit(), so the one-step functions PK11_Encrypt() and
PK11_Decrypt() have to be used.
NSS 3.52 also changed a parameter struct definition - see
https://fedoraproject.org/wiki/Changes/NssGCMParams - which is not a
problem for RHEL or SUSE system NSS since those are rebased, but it
is likely a problem for less well maintained Ubuntu LTS, so use
the old struct definition which evidently still works with NSS 3.94.
NSS 3.52 also added a new PK11_AEADOp() API but it looks like this
doesn't support incremental encryption either.
Change-Id: Ibd4a672db74b65b1218926ba35ff8d2f70444c7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160505
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Ic073d7444e968e90068aa60847bc9211167f6278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159626
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I5d70d9291a64139bc2dc60c63173fef862a00f2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158207
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
See tdf#42949 for motivation
Change-Id: I6b4b05a5e59b256653c4caf5297fffd601b45083
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128845
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
Change-Id: I5b04f7adf11c61f52b7bfb0f52c8c075f838f0f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127480
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...in 2132da5066143d7828984bc1aa42d10223bc5824 "loplugin:stringliteraldefine in
package", which caused CppunitTest_xmlsecurity_signing to fail with
> [_RUN_____] testODFEncryptedGPG::TestBody
> librdf error ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ - XML parser error - Document is empty
> warn:sw:113776:113776:sw/source/filter/xml/swxml.cxx:214: SAX parse exception caught while importing: com.sun.star.xml.sax.SAXParseException message: [ line 1]: Document is empty
> ~/lo/core/sax/source/fastparser/fastparser.cxx:609
> wrapped: void message: /home/sbergman/lo/core/tools/source/debug/debug.cxx:104 PublicId: SystemId: LineNumber: 1 ColumnNumber: 1
> warn:sw:113776:113776:sw/source/filter/xml/swxml.cxx:214: SAX parse exception caught while importing: com.sun.star.xml.sax.SAXParseException message: [ line 1]: Document is empty
> /home/sbergman/lo/core/sax/source/fastparser/fastparser.cxx:609
> wrapped: void message: /home/sbergman/lo/core/tools/source/debug/debug.cxx:104 PublicId: SystemId: LineNumber: 1 ColumnNumber: 1
> warn:sw:113776:113776:sw/source/filter/xml/swxml.cxx:214: SAX parse exception caught while importing: com.sun.star.xml.sax.SAXParseException message: [ line 1]: Document is empty
> /home/sbergman/lo/core/sax/source/fastparser/fastparser.cxx:609
> wrapped: void message: /home/sbergman/lo/core/tools/source/debug/debug.cxx:104 PublicId: SystemId: LineNumber: 1 ColumnNumber: 1
> warn:sfx.view:113776:113776:sfx2/source/view/frmload.cxx:489: DBG_UNHANDLED_EXCEPTION in impl_handleCaughtError_nothrow exception: com.sun.star.task.ErrorCodeIOException message: SfxBaseModel::handleLoadError: 0x0x11b /home/sbergman/lo/core/sfx2/source/doc/sfxbasemodel.cxx:2787 errcode: 283
> warn:fwk.loadenv:113776:113776:framework/source/loadenv/loadenv.cxx:202: caught LoadEnvException 6 "interaction request", com.sun.star.task.ErrorCodeRequest "/home/sbergman/lo/core/sfx2/source/doc/objmisc.cxx:1698" while loading <file:///home/sbergman/lo/core//xmlsecurity/qa/unit/signing/data/encryptedGPG.odt>
> /home/sbergman/lo/core/unotest/source/cpp/macros_test.cxx:67:testODFEncryptedGPG::TestBody
> assertion failed
> - Expression: xComponent.is()
> - loading failed: file:///home/sbergman/lo/core//xmlsecurity/qa/unit/signing/data/encryptedGPG.odt
for me
Change-Id: I0326d5ab33a9cfe9c23aab4120b49f37548aea39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125936
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I91ce2f65513ea9ae74841c6b0286c01d4e6dd82f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125812
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I681a6b0b30aeff9a51e36050629d8a617797a21f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123419
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifa9f5c310a8be988c1058644540ac52f160bc156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123018
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
do more like
commit 121771e37f7e2de41cd5643475861062bf25627b
Date: Mon Sep 21 09:17:54 2020 +0200
Make some OUStringLiteral vars constexpr
cause coverity can live with that
Change-Id: I9efd7f848289c4865997a44c6780373068422227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).
For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.
In most places just a u"..." string literal prefix had to be added. In some
places
char const a[] = "...";
variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).
For all uses of macros expanding to string literals, the relevant uses have been
rewritten as
u"" MACRO
instead of changing the macro definitions. It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.
Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
with expressions like !(a && b)
Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie183cb0d374e8d9a02891a765f46583f7cc1c345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97618
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This was supposed to be implemented by commit
a7bf6488ebb544e1efaed0a1e53073df9cc2064d
"ODF1.3: import new OpenPGP encryption markup"
but it turns out that the ODF 1.3 cs01 schema differs from the
implementation:
in ODF 1.3 cs01 we have
<manifest:encrypted-key>
<manifest:encryption-method .../>
<manifest:keyinfo>
<manifest:PGPData>
</manifest:PGPData>
</manifest:keyinfo>
<manifest:CipherData>
</manifest:CipherData>
</manifest:encrypted-key>
whereas the implementation expects
<manifest:keyinfo>
<manifest:encrypted-key>
<manifest:encryption-method .../>
<manifest:PGPData>
</manifest:PGPData>
<manifest:CipherData>
</manifest:CipherData>
</manifest:encrypted-key>
</manifest:keyinfo>
Ideally the inner manifest:keyinfo should be manifest:KeyInfo but
not sure if that really matters.
Change-Id: I407321c857e7b3ed9f4d04568ca2ea116764b3da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94309
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: I4d81c7c1d241e51565d7cbc6549ac586136f0c86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found by a more aggressive variant of loplugin:unusedvariables.
This is my first pass, committing the simplest and most obviously
unnecessary vars
Change-Id: I9676a6e39a101937097788548764506c93811c57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1f8b626ae99bca6e31e7c4aa9c8a1fc016b76e5c
Reviewed-on: https://gerrit.libreoffice.org/79890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Individually, these don't make much difference, but they add up
to a halving the time to save on my machine.
ManifestImport::characters was spending time adding data to an OUString,
so convert that to an OUStringBuffer.
Change-Id: I267e701f4e7998044763f44199b1fe8a37325b68
Reviewed-on: https://gerrit.libreoffice.org/70311
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755
Reviewed-on: https://gerrit.libreoffice.org/63434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Look for const string fields which can be static, and
mostly convert them to OUStringLiteral
And add a getLength() method to OUStringLiteral to make
the transition easier.
Remove dead code in XclExpRoot::GenerateDefaultEncryptionData,
default password is never empty.
Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091
Reviewed-on: https://gerrit.libreoffice.org/59204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
With OFFICE-3940 the loext markup got accepted for ODF1.3 (and
the redundant KeyInfo element removed). Make sure manifest parser
can import new markup.
Change-Id: Id3c88654e8e6e0e256cd68fbb43f1ef670849cf7
Reviewed-on: https://gerrit.libreoffice.org/56597
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
and use the underlying comphelper methods rather. This is so that I can
break the dependency that tools has on sax, and can add methods that
make sax depend on tools.
Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5
Reviewed-on: https://gerrit.libreoffice.org/50767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iadd7f8f1194299cb50907d8594114c89c668ebd0
Reviewed-on: https://gerrit.libreoffice.org/46462
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I64200b2d03d579c5c83d1ec0cc8aaa839edaa7ed
|
|
Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a
Reviewed-on: https://gerrit.libreoffice.org/42173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc
Reviewed-on: https://gerrit.libreoffice.org/39899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
they are only needed where type deduction fails.
left them in defines for now.
Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
ODF 1.2 uses an incorrect URL to refer to SHA256, add support for the
correct W3C URL on import but continue to export the incorrect URL for
now.
Change-Id: I3135bcf989070d20f85f14702db07595f304e706
|
|
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c
Reviewed-on: https://gerrit.libreoffice.org/24674
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I83d03dcc76b5f0d54ebb0513ae972acb0db8eef1
|
|
Change-Id: I7b7b0e7fea2d1a2b9f6f5501ad5e0b8c1b4a17b9
|
|
Change-Id: I86ff38a90018a2ddfb2db3babf67168b0e6257a5
|
|
ie.
void f(void);
becomes
void f();
I used the following command to make the changes:
git grep -lP '\(\s*void\s*\)' -- *.cxx \
| xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'
and ran it for both .cxx and .hxx files.
Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
|
|
Deprecated comphelper/sequenceasvector.hxx.
Rewritten code using it. Using instead the functions containerToSequence and
sequenceToContainer, found in include/comphelper/sequence.hxx.
One class that inherits from it (in framework/inc/stdtypes.h), and
the code using that has been left.
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/TblStylePrHandler.hxx
writerfilter/source/dmapper/WrapPolygonHandler.hxx
Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
|
|
Change-Id: I8d01dbad13cf26473c03d0c3dd01ae7baca991fb
|
|
Sadly cannot forward declare "struct {...} TimeValue;".
rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...
Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
|
|
Change-Id: I05dd5070d0618ef7539b26c7edcaf01b0a84732c
|
|
|
|
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
|
|
Change-Id: I5dfdb3a11737a2cb805ff44652c9ca502e5fc81b
|
|
This also means that this code now gets bounds checked in debug builds.
Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
|
|
Change-Id: Ic3743e48ef9055933ff040c180561ef41b3a2990
Reviewed-on: https://gerrit.libreoffice.org/5174
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
|
|
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
|
|
brain damage...
Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
|