diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipPackageStream.hxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 2 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx index 4abb74a684da..3fc124973704 100644 --- a/package/inc/ZipPackageStream.hxx +++ b/package/inc/ZipPackageStream.hxx @@ -84,9 +84,9 @@ public: void SetFromManifest( bool bValue ) { m_bFromManifest = bValue; } enum class Bugs { None, WinEncodingWrongSHA1, WrongSHA1 }; - ::rtl::Reference<EncryptionData> GetEncryptionData(Bugs bugs = Bugs::WrongSHA1); + ::rtl::Reference<EncryptionData> GetEncryptionData(Bugs bugs = Bugs::None); - css::uno::Sequence<sal_Int8> GetEncryptionKey(Bugs bugs = Bugs::WrongSHA1); + css::uno::Sequence<sal_Int8> GetEncryptionKey(Bugs bugs = Bugs::None); sal_Int32 GetStartKeyGenID(); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 9a4853f439c6..087a77461d90 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1625,7 +1625,7 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() if ( m_nStartKeyGenerationID == xml::crypto::DigestID::SHA256 ) aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA256UTF8; else if ( m_nStartKeyGenerationID == xml::crypto::DigestID::SHA1 ) - aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA1UTF8; + aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA1CORRECT; else throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" ); diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 59efbcc33ad8..2bcdb073bf3c 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -1011,7 +1011,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() uno::Reference< io::XInputStream > xResult; try { - xResult = m_rZipPackage.getZipFile().getDataStream( aEntry, GetEncryptionData(Bugs::WrongSHA1), m_bIsEncrypted, m_rZipPackage.GetSharedMutexRef() ); + xResult = m_rZipPackage.getZipFile().getDataStream( aEntry, GetEncryptionData(Bugs::None), m_bIsEncrypted, m_rZipPackage.GetSharedMutexRef() ); } catch( const packages::WrongPasswordException& ) { @@ -1019,8 +1019,8 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() { SAL_WARN("package", "ZipPackageStream::getDataStream(): SHA1 mismatch, trying fallbacks..."); try - { // tdf#114939 try without legacy StarOffice SHA1 bug - xResult = m_rZipPackage.getZipFile().getDataStream( aEntry, GetEncryptionData(Bugs::None), m_bIsEncrypted, m_rZipPackage.GetSharedMutexRef() ); + { // tdf#114939 try with legacy StarOffice SHA1 bug + xResult = m_rZipPackage.getZipFile().getDataStream( aEntry, GetEncryptionData(Bugs::WrongSHA1), m_bIsEncrypted, m_rZipPackage.GetSharedMutexRef() ); return xResult; } catch (const packages::WrongPasswordException&) |