diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-04 10:49:12 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-04 11:48:48 +0100 |
commit | e89610dad647ea5c77805ff06af1ea9870ae9f15 (patch) | |
tree | 12964e3657c079792fe218c3750e339b1c775262 /xmlsecurity/source/dialogs | |
parent | 38c39dc49c502683a3ccbcbfaa7e7ecee413c30f (diff) |
xmlsecurity OOXML export: only cache existing signatures, not our temp. one
When adding a signature, first we export it to a temp. storage, then
read it back, show the verification to the user, and then later we do or
do not write the temp. storage back to the original one.
This means the signature gets exported two times, and MSO only considers
the final result valid. So when caching signatures (to avoid a real
export based on our data model), don't cache the one we just added to
the temp. storage, but do a real export second time as well.
With this, MSO considers our appended signature (next to an existing
one) valid, too.
Change-Id: I4d615298463e037ea4e654ff5c3addcef8b0a094
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 77d058d0a7e2..8e7806e12453 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -413,7 +413,7 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, AddButtonHdl, Button*, void) // will not contain // SecurityOperationStatus_OPERATION_SUCCEEDED mbVerifySignatures = true; - ImplGetSignatureInformations(true); + ImplGetSignatureInformations(true, /*bCacheLastSignature=*/false); ImplFillSignaturesBox(); } } @@ -422,7 +422,7 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, AddButtonHdl, Button*, void) { OSL_FAIL( "Exception while adding a signature!" ); // Don't keep invalid entries... - ImplGetSignatureInformations(true); + ImplGetSignatureInformations(true, /*bCacheLastSignature=*/false); ImplFillSignaturesBox(); } } @@ -624,9 +624,9 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox() //If bUseTempStream is true then the temporary signature stream is used. //Otherwise the real signature stream is used. -void DigitalSignaturesDialog::ImplGetSignatureInformations(bool bUseTempStream) +void DigitalSignaturesDialog::ImplGetSignatureInformations(bool bUseTempStream, bool bCacheLastSignature) { - maSignatureManager.read(bUseTempStream); + maSignatureManager.read(bUseTempStream, bCacheLastSignature); mbVerifySignatures = false; } |