diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/http.c | 7 | ||||
-rw-r--r-- | src/libutil/http.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 4405e3fc5..f1a1dac75 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -2230,13 +2230,14 @@ rspamd_http_print_key_component (guchar *data, gsize datalen, g_string_append_printf (res, "%s", b32); g_free (b32); } + else if (how & RSPAMD_KEYPAIR_HEX) { + rspamd_printf_gstring (res, "%*xs", (gint)datalen, data); + } else { g_string_append_len (res, data, datalen); } - if (how & RSPAMD_KEYPAIR_HUMAN) { - g_string_append_c (res, '\n'); - } + g_string_append_c (res, '\n'); } GString * diff --git a/src/libutil/http.h b/src/libutil/http.h index efd6d1e17..ffc820ce8 100644 --- a/src/libutil/http.h +++ b/src/libutil/http.h @@ -199,7 +199,8 @@ gboolean rspamd_http_connection_is_encrypted (struct rspamd_http_connection *con /** Encode output with base 32 */ #define RSPAMD_KEYPAIR_BASE32 0x8 /** Human readable output */ -#define RSPAMD_KEYPAIR_HUMAN 0x16 +#define RSPAMD_KEYPAIR_HUMAN 0x10 +#define RSPAMD_KEYPAIR_HEX 0x20 /** * Print keypair encoding it if needed * @param key key to print |