diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-04 09:40:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-04 11:48:48 +0100 |
commit | 38c39dc49c502683a3ccbcbfaa7e7ecee413c30f (patch) | |
tree | adc7836638648f8f4c869680bc98d4a4702e7a1a /xmlsecurity/source/helper/xsecverify.cxx | |
parent | b9fb9062a999b3342010e6d26919e6d49065abb1 (diff) |
xmlsecurity OOXML export: fix appending new signatures next to existing ones
We append a new signature to a document by re-exporting the existing
ones, then writing the new signature. Given that existing signatures
aren't canonicalized before hashing, write them back as-is.
With this, our own signature verification is happy about the export
result, containing an existing and a newly created signature.
Change-Id: I0ff57a2266c6070a945f0c45ca5793406678be60
Diffstat (limited to 'xmlsecurity/source/helper/xsecverify.cxx')
-rw-r--r-- | xmlsecurity/source/helper/xsecverify.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index a7e218398924..bef6fa706945 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -274,6 +274,15 @@ void XSecController::setDescription(const OUString& rDescription) rInformation.signatureInfor.ouDescription = rDescription; } +void XSecController::setSignatureBytes(const uno::Sequence<sal_Int8>& rBytes) +{ + if (m_vInternalSignatureInformations.empty()) + return; + + InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back(); + rInformation.signatureInfor.aSignatureBytes = rBytes; +} + void XSecController::setCertDigest(const OUString& rCertDigest) { if (m_vInternalSignatureInformations.empty()) |