summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-04 10:49:12 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-04 11:48:48 +0100
commite89610dad647ea5c77805ff06af1ea9870ae9f15 (patch)
tree12964e3657c079792fe218c3750e339b1c775262 /xmlsecurity/inc
parent38c39dc49c502683a3ccbcbfaa7e7ecee413c30f (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/inc')
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 6719c2613111..b5a7e1b83871 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -54,7 +54,7 @@ public:
/// Add a new signature, using xCert as a signing certificate, and rDescription as description.
bool add(const css::uno::Reference<css::security::XCertificate>& xCert, const OUString& rDescription, sal_Int32& nSecurityId);
/// Read signatures from either a temp stream or the real storage.
- void read(bool bUseTempStream);
+ void read(bool bUseTempStream, bool bCacheLastSignature = true);
};
#endif // INCLUDED_XMLSECURITY_INC_XMLSECURITY_DOCUMENTSIGNATUREMANAGER_HXX
diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
index eb99f3579887..83370dbb8c6d 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -91,7 +91,7 @@ private:
DECL_LINK_TYPED(StartVerifySignatureHdl, LinkParamNone*, bool );
DECL_LINK_TYPED(OKButtonHdl, Button*, void );
- void ImplGetSignatureInformations(bool bUseTempStream);
+ void ImplGetSignatureInformations(bool bUseTempStream, bool bCacheLastSignature = true);
void ImplFillSignaturesBox();
void ImplShowSignaturesDetails();
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 55dc230dfdf3..a8cdf93aa688 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -178,7 +178,7 @@ public:
static void ExportSignature( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler, const SignatureInformation& signatureInfo );
/// Read and verify OOXML signatures.
- bool ReadAndVerifySignatureStorage(const css::uno::Reference<css::embed::XStorage>& xStorage);
+ bool ReadAndVerifySignatureStorage(const css::uno::Reference<css::embed::XStorage>& xStorage, bool bCacheLastSignature = true);
/// Read and verify a single OOXML signature.
bool ReadAndVerifySignatureStorageStream(const css::uno::Reference<css::io::XInputStream>& xInputStream);
/// Adds an OOXML digital signature relation to _rels/.rels if there wasn't any before.