1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

Fix SSL connection to some IRC servers using Diffie Hellman and small exchange keys (bug #25996)

This commit is contained in:
Sebastien Helleu
2009-03-27 16:48:58 +01:00
parent 6e7b62be97
commit 540756bf54
21 changed files with 356 additions and 89 deletions
+5 -3
View File
@@ -3424,10 +3424,11 @@ weechat_lua_api_hook_process (lua_State *L)
*/
int
weechat_lua_api_hook_connect_cb (void *data, int status, const char *ip_address)
weechat_lua_api_hook_connect_cb (void *data, int status,
const char *error, const char *ip_address)
{
struct t_script_callback *script_callback;
char *lua_argv[3], str_status[32], empty_arg[1] = { '\0' };
char *lua_argv[4], str_status[32], empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
@@ -3438,7 +3439,8 @@ weechat_lua_api_hook_connect_cb (void *data, int status, const char *ip_address)
lua_argv[0] = str_status;
lua_argv[1] = (ip_address) ? (char *)ip_address : empty_arg;
lua_argv[2] = NULL;
lua_argv[2] = (error) ? (char *)error : empty_arg;
lua_argv[3] = NULL;
rc = (int *) weechat_lua_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,
+4 -3
View File
@@ -2862,10 +2862,10 @@ static XS (XS_weechat_api_hook_process)
int
weechat_perl_api_hook_connect_cb (void *data, int status,
const char *ip_address)
const char *error, const char *ip_address)
{
struct t_script_callback *script_callback;
char *perl_argv[3], str_status[32], empty_arg[1] = { '\0' };
char *perl_argv[4], str_status[32], empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
@@ -2876,7 +2876,8 @@ weechat_perl_api_hook_connect_cb (void *data, int status,
perl_argv[0] = str_status;
perl_argv[1] = (ip_address) ? (char *)ip_address : empty_arg;
perl_argv[2] = NULL;
perl_argv[2] = (error) ? (char *)error : empty_arg;
perl_argv[3] = NULL;
rc = (int *) weechat_perl_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,
@@ -3054,10 +3054,10 @@ weechat_python_api_hook_process (PyObject *self, PyObject *args)
int
weechat_python_api_hook_connect_cb (void *data, int status,
const char *ip_address)
const char *error, const char *ip_address)
{
struct t_script_callback *script_callback;
char *python_argv[3], str_status[32], empty_arg[1] = { '\0' };
char *python_argv[4], str_status[32], empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
@@ -3068,7 +3068,8 @@ weechat_python_api_hook_connect_cb (void *data, int status,
python_argv[0] = str_status;
python_argv[1] = (ip_address) ? (char *)ip_address : empty_arg;
python_argv[2] = NULL;
python_argv[2] = (error) ? (char *)error : empty_arg;
python_argv[3] = NULL;
rc = (int *) weechat_python_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,
+4 -3
View File
@@ -3494,10 +3494,10 @@ weechat_ruby_api_hook_process (VALUE class, VALUE command, VALUE timeout,
int
weechat_ruby_api_hook_connect_cb (void *data, int status,
const char *ip_address)
const char *error, const char *ip_address)
{
struct t_script_callback *script_callback;
char *ruby_argv[3], str_status[32], empty_arg[1] = { '\0' };
char *ruby_argv[4], str_status[32], empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
@@ -3508,7 +3508,8 @@ weechat_ruby_api_hook_connect_cb (void *data, int status,
ruby_argv[0] = str_status;
ruby_argv[1] = (ip_address) ? (char *)ip_address : empty_arg;
ruby_argv[2] = NULL;
ruby_argv[2] = (error) ? (char *)error : empty_arg;
ruby_argv[3] = NULL;
rc = (int *) weechat_ruby_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,
+3 -1
View File
@@ -917,7 +917,9 @@ script_api_hook_connect (struct t_weechat_plugin *weechat_plugin,
const char *proxy, const char *address, int port,
int sock, int ipv6, void *gnutls_sess,
const char *local_hostname,
int (*callback)(void *data, int status, const char *ip_address),
int (*callback)(void *data, int status,
const char *error,
const char *ip_address),
const char *function)
{
struct t_script_callback *new_script_callback;
+1
View File
@@ -159,6 +159,7 @@ extern struct t_hook *script_api_hook_connect (struct t_weechat_plugin *weechat_
const char *local_hostname,
int (*callback)(void *data,
int status,
const char *error,
const char *ip_address),
const char *function);
extern struct t_hook *script_api_hook_print (struct t_weechat_plugin *weechat_plugin,
+4 -3
View File
@@ -3274,10 +3274,10 @@ weechat_tcl_api_hook_process (ClientData clientData, Tcl_Interp *interp,
int
weechat_tcl_api_hook_connect_cb (void *data, int status,
const char *ip_address)
const char *error, const char *ip_address)
{
struct t_script_callback *script_callback;
char *tcl_argv[3], str_status[32], empty_arg[1] = { '\0' };
char *tcl_argv[4], str_status[32], empty_arg[1] = { '\0' };
int *rc, ret;
script_callback = (struct t_script_callback *)data;
@@ -3288,7 +3288,8 @@ weechat_tcl_api_hook_connect_cb (void *data, int status,
tcl_argv[0] = str_status;
tcl_argv[1] = (ip_address) ? (char *)ip_address : empty_arg;
tcl_argv[2] = NULL;
tcl_argv[2] = (error) ? (char *)error : empty_arg;
tcl_argv[3] = NULL;
rc = (int *) weechat_tcl_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_INT,