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:
parent
99f8714280
commit
2f17679a46
1 changed files with 0 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue