summaryrefslogtreecommitdiff
path: root/package/source/zippackage/ZipPackage.cxx
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-08-20 03:18:09 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-20 05:02:13 +0200
commit7a82caa8f7874f44f32c633140b015325454e570 (patch)
treef79d105abbda02d1afa9fde594f12bb649e8137c /package/source/zippackage/ZipPackage.cxx
parentb9f85538e65882238de80ab36c864bc0082ad7f4 (diff)
package: get rid of requirement for plain passwords
Change-Id: I36d41d9166ae2b2ea287af82c87b5f2ea86bd564 Reviewed-on: https://gerrit.libreoffice.org/41344 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'package/source/zippackage/ZipPackage.cxx')
-rw-r--r--package/source/zippackage/ZipPackage.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 33ed9c1bc023..d91c0785304c 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1672,9 +1672,8 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
// this property is only necessary to support raw passwords in storage API;
// because of this support the storage has to operate with more than one key dependent on storage generation algorithm;
// when this support is removed, the storage will get only one key from outside
- // TODO/LATER: Get rid of this property as well as of support of raw passwords in storages
uno::Sequence< beans::NamedValue > aKeys;
- if ( !( aValue >>= aKeys ) || ( aKeys.getLength() && aKeys.getLength() < 2 ) )
+ if ( !( aValue >>= aKeys ) || ( aKeys.getLength() && aKeys.getLength() < 1 ) )
throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 2 );
if ( aKeys.getLength() )
@@ -1689,7 +1688,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
bHasSHA1 = true;
}
- if ( !bHasSHA256 || !bHasSHA1 )
+ if ( !bHasSHA256 && !bHasSHA1 )
throw IllegalArgumentException(THROW_WHERE "Expected keys are not provided!", uno::Reference< uno::XInterface >(), 2 );
}