aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/http.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-28 17:52:59 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-28 17:52:59 +0000
commitddc00caeab38019d9d34fed60168dc33de754b1f (patch)
tree3456eae45be89ddb3ae82c13eab1c51331b8f8f1 /src/libutil/http.h
parenta5fdfa3a5a6642bf350260cc72a4c87c27abdab3 (diff)
downloadrspamd-ddc00caeab38019d9d34fed60168dc33de754b1f.tar.gz
rspamd-ddc00caeab38019d9d34fed60168dc33de754b1f.zip
Rework key API to allow reusing of keypairs.
Diffstat (limited to 'src/libutil/http.h')
-rw-r--r--src/libutil/http.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libutil/http.h b/src/libutil/http.h
index 10634e2c7..5234fe46b 100644
--- a/src/libutil/http.h
+++ b/src/libutil/http.h
@@ -148,14 +148,20 @@ struct rspamd_http_connection * rspamd_http_connection_new (
enum rspamd_http_connection_type type);
/**
- * Load the encryption keypair for this connection
- * @param conn connection structure
+ * Load the encryption keypair
* @param key base32 encoded privkey and pubkey (in that order)
* @param keylen length of base32 string
- * @return TRUE if a key has been loaded successfully
+ * @return opaque pointer pr NULL in case of error
+ */
+gpointer rspamd_http_connection_make_key (gchar *key, gsize keylen);
+
+/**
+ * Set key pointed by an opaque pointer
+ * @param conn connection structure
+ * @param key opaque key structure
*/
-gboolean rspamd_http_connection_set_key (struct rspamd_http_connection *conn,
- gchar *key, gsize keylen);
+void rspamd_http_connection_set_key (struct rspamd_http_connection *conn,
+ gpointer key);
/**
* Handle a request using socket fd and user data ud