commit f8e0a67: [Minor] Allow to get keypairs extensions
Vsevolod Stakhov
vsevolod at rspamd.com
Wed Jan 4 19:56:03 UTC 2023
Author: Vsevolod Stakhov
Date: 2023-01-04 11:34:44 +0000
URL: https://github.com/rspamd/rspamd/commit/f8e0a6741a32b32a815f959dd817aa3f3ef127fa
[Minor] Allow to get keypairs extensions
---
src/libcryptobox/keypair.c | 8 ++++++++
src/libcryptobox/keypair.h | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/src/libcryptobox/keypair.c b/src/libcryptobox/keypair.c
index da26fcff7..98e2322d3 100644
--- a/src/libcryptobox/keypair.c
+++ b/src/libcryptobox/keypair.c
@@ -512,6 +512,14 @@ rspamd_keypair_get_id (struct rspamd_cryptobox_keypair *kp)
return kp->id;
}
+const ucl_object_t *
+rspamd_keypair_get_extensions (struct rspamd_cryptobox_keypair *kp)
+{
+ g_assert (kp != NULL);
+
+ return kp->extensions;
+}
+
const guchar *
rspamd_pubkey_get_id (struct rspamd_cryptobox_pubkey *pk)
{
diff --git a/src/libcryptobox/keypair.h b/src/libcryptobox/keypair.h
index 778e2ce6a..ecb7fc81c 100644
--- a/src/libcryptobox/keypair.h
+++ b/src/libcryptobox/keypair.h
@@ -163,6 +163,13 @@ const guchar *rspamd_pubkey_calculate_nm (struct rspamd_cryptobox_pubkey *p,
*/
const guchar *rspamd_keypair_get_id (struct rspamd_cryptobox_keypair *kp);
+/**
+ * Returns keypair extensions if any
+ * @param kp
+ * @return
+ */
+const ucl_object_t *rspamd_keypair_get_extensions (struct rspamd_cryptobox_keypair *kp);
+
/**
* Get raw public key id for a specified key (rspamd_cryptobox_HASHBYTES)
* @param kp
More information about the Commits
mailing list