summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc/xmlsignaturehelper.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-08 14:10:05 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-08 14:50:56 +0000
commita69873d212c903ea8a1f0d5ca40ae3f08b83a871 (patch)
treef1554b070e0525da09eaf482908780901b1ee324 /xmlsecurity/inc/xmlsignaturehelper.hxx
parent2573f6bba6b3033143b776650f03fd4813669e5b (diff)
xmlsecurity: move the sec context from the format helpers to the sign manager
The signature manager always creates an XML helper, and optionally creates a PDF helper as well. Both of them initialize xmlsec, and when the signature manager is deleted, there are two de-inits, leading to an assertion failure in xmlsec. Fix the problem by moving the duplicated xmlsec init to the signature manager. This has the additional benefit that general security-related code no longer has to talk to the XML helper, it can use the signature manager, which feels more natural. (What viewing a certificate had to do with XML?) Change-Id: If6a6bc433636445f3782849a367d4a7ac0be7688 Reviewed-on: https://gerrit.libreoffice.org/30695 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmlsecurity/inc/xmlsignaturehelper.hxx')
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper.hxx12
1 files changed, 1 insertions, 11 deletions
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index 8e0c65809e7b..c2a163b437e4 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -100,9 +100,6 @@ private:
css::uno::Reference< css::xml::crypto::sax::XSecurityController > mxSecurityController;
css::uno::Reference< css::xml::crypto::XUriBinding > mxUriBinding;
- css::uno::Reference< css::xml::crypto::XSEInitializer > mxSEInitializer;
- css::uno::Reference< css::xml::crypto::XXMLSecurityContext > mxSecurityContext;
-
std::vector<XMLSignatureCreationResult>
maCreationResults;
std::vector<XMLSignatureVerifyResult>
@@ -123,10 +120,6 @@ public:
XMLSignatureHelper(const css::uno::Reference< css::uno::XComponentContext >& mrCtx );
~XMLSignatureHelper();
- // Initialize the security context with default crypto token.
- // Returns true for success.
- bool Init();
-
// Set the storage which should be used by the default UriBinding
// Must be set before StatrtMission().
//sODFVersion indicates the ODF version
@@ -137,15 +130,12 @@ public:
// Default handler will verify all.
void SetStartVerifySignatureHdl( const Link<LinkParamNone*,bool>& rLink );
- // Get the security environment
- css::uno::Reference< css::xml::crypto::XSecurityEnvironment > GetSecurityEnvironment();
-
// After signing/verifying, get information about signatures
SignatureInformation GetSignatureInformation( sal_Int32 nSecurityId ) const;
SignatureInformations GetSignatureInformations() const;
// See XSecController for documentation
- void StartMission();
+ void StartMission(const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext);
void EndMission();
sal_Int32 GetNewSecurityId();
/** sets data that describes the certificate.