summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-07-07 15:22:36 +0200
committerTomaž Vajngerl <quikee@gmail.com>2018-07-07 22:58:34 +0200
commit7ba835ff5837290598d0b27c90a8abcfedf5b210 (patch)
tree5dfb662d735872107b9edcf53131dc883122d97e /include
parent8efeb81537726445954b10314ebbd770d266ac20 (diff)
oox: Handle agile encryption info "reserved" field correctly
The "reserved" filed is written fter the version number major, minor which is used to identify the encryption as agile. The "reserved" field must always have the value 0x00000040. This change writes the reserved filed correctly and when encryption and when decrypting it checks the value an potentially bails out if it desn't contain the expected value. Change-Id: I2045dc64e0c6bbb3318384e25deef2ba8f41b94c Reviewed-on: https://gerrit.libreoffice.org/57140 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/filter/msfilter/mscodec.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/filter/msfilter/mscodec.hxx b/include/filter/msfilter/mscodec.hxx
index aa38f6e9fc00..bc0240ae20eb 100644
--- a/include/filter/msfilter/mscodec.hxx
+++ b/include/filter/msfilter/mscodec.hxx
@@ -438,6 +438,8 @@ 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;
+const sal_uInt32 AGILE_ENCRYPTION_RESERVED = 0x00000040;
+
const sal_uInt32 SALT_LENGTH = 16;
const sal_uInt32 ENCRYPTED_VERIFIER_LENGTH = 16;
const sal_uInt32 SHA1_HASH_LENGTH = RTL_DIGEST_LENGTH_SHA1; // 20