[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - include/oox oox/source

Tomaž Vajngerl tomaz.vajngerl at collabora.com
Tue Mar 25 13:20:53 PDT 2014


 include/oox/crypto/Standard2007Engine.hxx |    5 ++++-
 oox/source/crypto/DocumentDecryption.cxx  |    1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 19f74aed27868105bc67c642dff0c3e1cb7594c2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Mon Mar 24 18:19:54 2014 +0100

    fdo#76222 oox: add support for MSO 2007 SP2 encrypted documents
    
    Change-Id: I8fa586d49437ff5422fc3daa4c81439146e598a0
    Reviewed-on: https://gerrit.libreoffice.org/8734
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/oox/crypto/Standard2007Engine.hxx b/include/oox/crypto/Standard2007Engine.hxx
index 37ae0a0..329d790 100644
--- a/include/oox/crypto/Standard2007Engine.hxx
+++ b/include/oox/crypto/Standard2007Engine.hxx
@@ -37,7 +37,10 @@ const sal_uInt32 ENCRYPT_PROVIDER_TYPE_AES  = 0x00000018;
 const sal_uInt32 ENCRYPT_PROVIDER_TYPE_RC4  = 0x00000001;
 
 // version of encryption info used in MS Office 2007 (major = 3, minor = 2)
-const sal_uInt32 VERSION_INFO_2007_FORMAT   = 0x00020003;
+const sal_uInt32 VERSION_INFO_2007_FORMAT       = 0x00020003;
+// version of encryption info used in MS Office 2007 SP2 and older (major = 4, minor = 2)
+const sal_uInt32 VERSION_INFO_2007_FORMAT_SP2   = 0x00020004;
+
 // version of encryption info - agile (major = 4, minor = 4)
 const sal_uInt32 VERSION_INFO_AGILE         = 0x00040004;
 
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index 47fa006..28eb79e 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -347,6 +347,7 @@ bool DocumentDecryption::readEncryptionInfo()
     switch (aVersion)
     {
         case VERSION_INFO_2007_FORMAT:
+        case VERSION_INFO_2007_FORMAT_SP2:
             mCryptoType = STANDARD_2007; // Set encryption info format
             bResult = readStandard2007EncryptionInfo( aBinaryInputStream );
             break;


More information about the Libreoffice-commits mailing list