diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-12-04 17:36:09 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-12-04 17:36:09 +0100 |
commit | 7e5acaf50f25dd097e8225b0df6c4731c8730a63 (patch) | |
tree | b625584236ec23fcd11c4f37a845f41243d64859 /src/plugins/irc | |
parent | da6b882ed82b9e902df5649c326ecfa7ddae4d84 (diff) | |
download | weechat-7e5acaf50f25dd097e8225b0df6c4731c8730a63.zip |
Give GnuTLS return code to callback if handshake has failed, display extra info in irc plugin if Diffie-Hellman prime sent by the server is not acceptable (not long enough)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-server.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 9bcba9a27..a76abf4a5 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1909,8 +1909,8 @@ irc_server_switch_address (struct t_irc_server *server) */ int -irc_server_connect_cb (void *arg_server, int status, const char *error, - const char *ip_address) +irc_server_connect_cb (void *arg_server, int status, int gnutls_rc, + const char *error, const char *ip_address) { struct t_irc_server *server; const char *proxy; @@ -2045,6 +2045,17 @@ irc_server_connect_cb (void *arg_server, int status, const char *error, weechat_prefix ("error"), IRC_PLUGIN_NAME, error); } + if (gnutls_rc == GNUTLS_E_DH_PRIME_UNACCEPTABLE) + { + weechat_printf (server->buffer, + _("%s%s: you should play with option " + "irc.server.%s.ssl_dhkey_size (current " + "value is %d)"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + server->name, + IRC_SERVER_OPTION_INTEGER (server, + IRC_SERVER_OPTION_SSL_DHKEY_SIZE)); + } irc_server_close_connection (server); irc_server_switch_address (server); break; |