package: ignore unknown encryption parameters.

Do not throw an exception if there are encryption parameters,
but they are not supported in current output format. Invalid or
unsupported encryption then fails higher up the stack.

Change-Id: I21e4cf2f73d7c218ab5444b2016e838695163ca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84435
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
This commit is contained in:
Vasily Melenchuk 2019-11-18 11:26:23 +03:00 committed by Thorsten Behrens
parent 99f8714280
commit 2f17679a46

View file

@ -1645,11 +1645,6 @@ uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
for ( const auto& rKey : std::as_const(m_aStorageEncryptionKeys) )
if ( rKey.Name == aNameToFind )
rKey.Value >>= aResult;
// empty keys are not allowed here
// so it is not important whether there is no key, or the key is empty, it is an error
if ( !aResult.hasElements() )
throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );
}
else
aResult = m_aEncryptionKey;