diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-09-20 08:13:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-09-20 10:19:56 +0200 |
commit | 7bad76c3a5b319f8ede74be8f78e5645f9ffd050 (patch) | |
tree | b010c3ba57e60c6c61f66d06602941c218720282 /include | |
parent | f317746f55044927a180657f81e21d662102b0c5 (diff) |
cool#9992 lok doc sign: extract duplicated code to SfxLokHelper
I want to improve extractCertificate() so it can work on a certificate
chain, but that's easier when this code is not directly in desktop/, but
at some lower level.
This allows covering the code with tests from CppunitTest_sfx2_view in a
follow-up change.
If this code will be needed by some non-LOK area as well, then it can be
moved down further, but let's wait for a second area first.
Change-Id: I6291da0c3e56aed7dca1a8dc1446209044cace92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173691
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/lokhelper.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 3820558d6500..195f2a7b3dba 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -11,6 +11,7 @@ #define INCLUDED_SFX2_LOKHELPER_HXX #include <com/sun/star/ui/XAcceleratorConfiguration.hpp> +#include <com/sun/star/security/XCertificate.hpp> #include <vcl/IDialogRenderable.hxx> #include <vcl/ITiledRenderable.hxx> @@ -237,6 +238,9 @@ public: static void notifyLog(const std::ostringstream& stream); + static std::string extractCertificate(const std::string& rCert); + static css::uno::Reference<css::security::XCertificate> getSigningCertificate(const std::string& rCert, const std::string& rKey); + private: static int createView(SfxViewFrame& rViewFrame, ViewShellDocId docId); }; |