diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 18:06:34 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-29 18:06:34 +0000 |
commit | 87c90bd928e494ebd5d7f9db3386f6fc46211c43 (patch) | |
tree | 263a1b9c6c6c4debd7a12cff05588e3570fa6261 /src/libutil/http.h | |
parent | 40c399d03f86dd3282afa038e608e358097651ae (diff) | |
download | rspamd-87c90bd928e494ebd5d7f9db3386f6fc46211c43.tar.gz rspamd-87c90bd928e494ebd5d7f9db3386f6fc46211c43.zip |
Add routine to print keys.
Diffstat (limited to 'src/libutil/http.h')
-rw-r--r-- | src/libutil/http.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libutil/http.h b/src/libutil/http.h index 589b38245..5183d4374 100644 --- a/src/libutil/http.h +++ b/src/libutil/http.h @@ -169,6 +169,25 @@ gpointer rspamd_http_connection_gen_key (void); */ void rspamd_http_connection_set_key (struct rspamd_http_connection *conn, gpointer key); + +/** Print pubkey */ +#define RSPAMD_KEYPAIR_PUBKEY 0x1 +/** Print secret key */ +#define RSPAMD_KEYPAIR_PRIVKEY 0x2 +/** Print key id */ +#define RSPAMD_KEYPAIR_ID 0x4 +/** Encode output with base 32 */ +#define RSPAMD_KEYPAIR_BASE32 0x8 +/** Human readable output */ +#define RSPAMD_KEYPAIR_HUMAN 0x16 +/** + * Print keypair encoding it if needed + * @param key key to print + * @param how flags that specifies printing behaviour + * @return newly allocated string with keypair + */ +GString *rspamd_http_connection_print_key (gpointer key, guint how); + /** * Release key pointed by an opaque pointer * @param key opaque key structure |