summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-10-24 10:56:15 +0200
committerTomaž Vajngerl <quikee@gmail.com>2018-10-31 09:08:20 +0100
commit08c3c504644ee978c2ec75ba083765b6ffddf08c (patch)
tree9f970be2003c0b0d9d3da1202904faa758c8e5d5 /include/LibreOfficeKit
parent7513af89362a7d54e0210049d3644db5818950a5 (diff)
lok: new function to add certificate to certificate DB
Also needed to extend XCertificateCreator with a new method "addDERCertificateToTheDatabase". Change-Id: I7b4df65365893bd5a0628aeec30b3156584849fe Reviewed-on: https://gerrit.libreoffice.org/62273 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx15
2 files changed, 18 insertions, 2 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 238d93f162db..e052765ac794 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -330,6 +330,11 @@ struct _LibreOfficeKitDocumentClass
const unsigned char* pPrivateKeyBinary,
const int nPrivateKeyBinarySize);
+ /// @see lok::Document::addCertificate().
+ bool (*addCertificate) (LibreOfficeKitDocument* pThis,
+ const unsigned char* pCertificateBinary,
+ const int nCertificateBinarySize);
+
/// @see lok::Document::getSignatureState().
int (*getSignatureState) (LibreOfficeKitDocument* pThis);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 829751f2efa9..c238d507c183 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -586,12 +586,23 @@ public:
const unsigned char* pPrivateKeyBinary,
const int nPrivateKeyBinarySize)
{
- return mpDoc->pClass->insertCertificate(mpDoc,
- pCertificateBinary, pCertificateBinarySize,
+ return mpDoc->pClass->insertCertificate(mpDoc,
+ pCertificateBinary, pCertificateBinarySize,
pPrivateKeyBinary, nPrivateKeyBinarySize);
}
/**
+ * Add the certificate (in binary form) to the certificate store.
+ *
+ */
+ bool addCertificate(const unsigned char* pCertificateBinary,
+ const int pCertificateBinarySize)
+ {
+ return mpDoc->pClass->addCertificate(mpDoc,
+ pCertificateBinary, pCertificateBinarySize);
+ }
+
+ /**
* Verify signature of the document.
*
* Check possible values in include/sfx2/signaturestate.hxx