summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2018-01-11 23:47:24 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-01-13 14:36:27 +0100
commit39805f65189cd0085fe8f1071ae75cdec450c65e (patch)
treea3561e72a034aa6a92949de9a790617a1c972af0 /package/inc
parent6df0c7bc230a424f5aefe583b591df70c6273b6f (diff)
tdf#114550 don't use PBKDF2 in package for gpg encryption
No need to derive password-based key, simply skip rtl_digest_PBKDF2 for the gpg4libre case. Also pass down PBKDF2 iteration count from ZipPackage, which knows about GPG encryption, instead of just always setting it in package stream. We otherwise needlessly iterate session key also for gpg encrypted storages. Change-Id: Ic96b2193f8541bbd109795fb9c0212a0a10c7344 Reviewed-on: https://gerrit.libreoffice.org/47783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipPackageEntry.hxx1
-rw-r--r--package/inc/ZipPackageFolder.hxx2
-rw-r--r--package/inc/ZipPackageStream.hxx1
3 files changed, 4 insertions, 0 deletions
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index 300b5f25ea67..5e0064f9bf7e 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -69,6 +69,7 @@ public:
std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList,
ZipOutputStream & rZipOut,
const css::uno::Sequence < sal_Int8 >& rEncryptionKey,
+ sal_Int32 nPBKDF2IterationCount,
const rtlRandomPool &rRandomPool ) = 0;
void clearParent()
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx
index 0fad51f72ba2..1f65b2ca297e 100644
--- a/package/inc/ZipPackageFolder.hxx
+++ b/package/inc/ZipPackageFolder.hxx
@@ -73,6 +73,7 @@ public:
std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList,
ZipOutputStream & rZipOut,
const css::uno::Sequence < sal_Int8 >& rEncryptionKey,
+ sal_Int32 nPBKDF2IterationCount,
const rtlRandomPool &rRandomPool ) override;
// Recursive functions
@@ -82,6 +83,7 @@ public:
std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList,
ZipOutputStream & rZipOut,
const css::uno::Sequence< sal_Int8 > &rEncryptionKey,
+ sal_Int32 nPBKDF2IterationCount,
const rtlRandomPool & rRandomPool) const;
// XNameContainer
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index b691370bf7e0..014898115517 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -133,6 +133,7 @@ public:
std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList,
ZipOutputStream & rZipOut,
const css::uno::Sequence < sal_Int8 >& rEncryptionKey,
+ sal_Int32 nPBKDF2IterationCount,
const rtlRandomPool &rRandomPool ) override;
void setZipEntryOnLoading( const ZipEntry &rInEntry);