summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-03-21 23:36:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-03-21 23:36:24 +0100
commitff321123961d73283b20b35b3df1df0e6ea5eafe (patch)
tree0ba2323c28f7ee9136aee511a785e22d57dc6d35 /src/plugins
parent2da148eb5551efa2e4b4a5bf74c02d88d3b97d4c (diff)
downloadweechat-ff321123961d73283b20b35b3df1df0e6ea5eafe.zip
irc: fix length of string for SHA-512, SHA-256 and SHA-1 in help on ssl_fingerprint option
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-config.c4
-rw-r--r--src/plugins/irc/irc-server.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 015950753..4cf44d175 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -1735,8 +1735,8 @@ irc_config_server_new_option (struct t_config_file *config_file,
option_name, "string",
N_("fingerprint of certificate which is trusted and accepted "
"for the server; only hexadecimal digits are allowed (0-9, "
- "a-f): 64 chars for SHA-512, 32 chars for SHA-256, "
- "20 chars for SHA-1 (insecure, not recommended); many "
+ "a-f): 128 chars for SHA-512, 64 chars for SHA-256, "
+ "40 chars for SHA-1 (insecure, not recommended); many "
"fingerprints can be separated by commas; if this option "
"is set, the other checks on certificates are NOT "
"performed (option \"ssl_verify\") "
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index b82df75c4..36dd6889e 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -4147,7 +4147,7 @@ irc_server_fingerprint_search_algo_with_size (int size)
* Returns a string with sizes of allowed fingerprint,
* in number of hexadecimal digits (== bits / 4).
*
- * Example of output: "64=SHA-512, 32=SHA-256, 20=SHA-1".
+ * Example of output: "128=SHA-512, 64=SHA-256, 40=SHA-1".
*
* Note: result must be freed after use.
*/
@@ -4165,7 +4165,7 @@ irc_server_fingerprint_str_sizes ()
{
snprintf (str_one_size, sizeof (str_one_size),
"%d=%s%s",
- irc_fingerprint_digest_algos_size[i] / 8,
+ irc_fingerprint_digest_algos_size[i] / 4,
irc_fingerprint_digest_algos_name[i],
(i > 0) ? ", " : "");
strcat (str_sizes, str_one_size);