irc: add option "ssl_priorities" in servers (task #10106, debian #624055)

v2.8-utf8proc
Sebastien Helleu 2011-04-28 12:29:56 +02:00
parent f4f90e85fb
commit f393d0a3d2
31 changed files with 378 additions and 75 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.5-rc1, 2011-04-26
v0.3.5-rc1, 2011-04-28
Version 0.3.5 (under dev!)
@ -63,6 +63,7 @@ Version 0.3.5 (under dev!)
(plugins: irc, relay, xfer, scripts)
* aspell: add section "option" in aspell.conf for speller options (task #11083)
* aspell: fix spellers used after switch of window (bug #32811)
* irc: add option "ssl_priorities" in servers (task #10106, debian #624055)
* irc: add modifier "irc_in2_xxx" (called after charset decoding)
* irc: fix memory leak when copying or renaming server
* irc: do not rejoin channels where /part has been issued before reconnection

View File

@ -483,6 +483,11 @@
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `2048`)
* *irc.server_default.ssl_priorities*
** Beschreibung: `string with priorities for gnutls (for syntax, see documentation of function gnutls_priority_init in gnutls manual, common strings are: "PERFORMANCE", "NORMAL", "SECURE128", "SECURE256", "EXPORT", "NONE")`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"NORMAL"`)
* *irc.server_default.ssl_verify*
** Beschreibung: `Überprüfe ob die SSL-Verbindung vertrauenswürdig ist`
** Typ: boolesch

View File

@ -483,6 +483,11 @@
** type: integer
** values: 0 .. 2147483647 (default value: `2048`)
* *irc.server_default.ssl_priorities*
** description: `string with priorities for gnutls (for syntax, see documentation of function gnutls_priority_init in gnutls manual, common strings are: "PERFORMANCE", "NORMAL", "SECURE128", "SECURE256", "EXPORT", "NONE")`
** type: string
** values: any string (default value: `"NORMAL"`)
* *irc.server_default.ssl_verify*
** description: `check that the ssl connection is fully trusted`
** type: boolean

View File

@ -483,6 +483,11 @@
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `2048`)
* *irc.server_default.ssl_priorities*
** description: `chaîne avec les priorités pour gnutls (pour la syntaxe, voir la documentation de la fonction gnutls_priority_init du manuel gnutls, les chaînes courantes sont: "PERFORMANCE", "NORMAL", "SECURE128", "SECURE256", "EXPORT", "NONE")`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"NORMAL"`)
* *irc.server_default.ssl_verify*
** description: `vérifier que la connexion ssl est entièrement de confiance`
** type: booléen

View File

@ -483,6 +483,11 @@
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `2048`)
* *irc.server_default.ssl_priorities*
** descrizione: `string with priorities for gnutls (for syntax, see documentation of function gnutls_priority_init in gnutls manual, common strings are: "PERFORMANCE", "NORMAL", "SECURE128", "SECURE256", "EXPORT", "NONE")`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"NORMAL"`)
* *irc.server_default.ssl_verify*
** descrizione: `verifica che la connessione ssl sia totalmente fidata`
** tipo: bool

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2617,6 +2617,9 @@ msgstr ""
"Pokud používá tento soubor jiný proces WeeChat, skuste WeeChat pustit\n"
"s jiným domovským adresářem pomocí \"--dir\" volby příkazové řádky.\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "typ proxy (http (výchozí), socks4, socks5)"
@ -4806,6 +4809,11 @@ msgstr "čísla pro definované ignorování"
msgid "nicks in notify list"
msgstr "%s: žádné ignorování v seznamu"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4860,6 +4868,12 @@ msgstr ""
"cesta pro hledání pluginů (\"%h\" bude nahrazeno domácím adresářem WeeChat, "
"\"~/.weechat\" je výchozí)"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr "velikost klíče použitého při použití výměny klíčů Diffie Hellman"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-15 21:04+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2830,6 +2830,9 @@ msgstr ""
"Aufruf der \"--dir\" Kommandozeilenoption, WeeChat mit einem anderen Home-"
"Verzeichnis zu starten.\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "Proxy-Typ (http (Standard), socks4, socks5)"
@ -5011,6 +5014,11 @@ msgstr "Anzahl für festgelegte /ignores"
msgid "nicks in notify list"
msgstr "Nicks für die eine Benachrichtigung existiert"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -5068,6 +5076,12 @@ msgstr ""
"(\"%h\" wird durch das WeeChat Verzeichnis ersetzt, Standardverzeichnis: "
"\"~/.weechat\")"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""
"Größe des Schlüssels der während des Diffie-Hellman-Schlüsselaustausches "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 17:31+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2683,6 +2683,9 @@ msgstr ""
"con otro directorio de inicio usando la opción de línea de comandos \"--dir"
"\"\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "tipo de proxy(http (por defecto), socks4, socks5)"
@ -4914,6 +4917,11 @@ msgstr "números para los ignores definidos"
msgid "nicks in notify list"
msgstr "apodos en la lista de notificación"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4967,6 +4975,12 @@ msgstr ""
"(\"%h\" será reemplazado por el directorio raíz de WeeChat, \"~/.weechat\" "
"por defecto)"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr "tamaño de la llave usada durante Diffie-Hellman Key Exchange"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"PO-Revision-Date: 2011-04-25 19:59+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-28 11:56+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -2779,6 +2779,9 @@ msgstr ""
"un autre répertoire de base en utilisant l'option de ligne de commande \"--"
"dir\".\n"
msgid "invalid priorities"
msgstr "priorités invalides"
msgid "proxy type (http (default), socks4, socks5)"
msgstr "type de proxy (http (défaut), socks4, socks5)"
@ -4931,6 +4934,13 @@ msgstr "numéros pour les ignores définis"
msgid "nicks in notify list"
msgstr "pseudos dans la liste de notifications"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
"%s%s: chaîne de priorités invalide, erreur à cette position dans la chaîne : "
"\"%s\""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4986,6 +4996,16 @@ msgstr ""
"pseudo (\"%h\" sera remplacé par le répertoire de base WeeChat, par défaut: "
"\"~/.weechat\")"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
"chaîne avec les priorités pour gnutls (pour la syntaxe, voir la "
"documentation de la fonction gnutls_priority_init du manuel gnutls, les "
"chaînes courantes sont: \"PERFORMANCE\", \"NORMAL\", \"SECURE128\", "
"\"SECURE256\", \"EXPORT\", \"NONE\")"
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr "taille de clé utilisée pour l'échange de clé Diffie-Hellman"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 11:21+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2410,6 +2410,9 @@ msgstr ""
"Ha egy másik WeeChat folyamat használja ezt a fájlt, próbálja másik\n"
"saját könyvtárral futtatni a WeeChat-et a \"--dir\" opció segítségével!\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "proxy típus (http (alapértelmezett), socks4, socks5)"
@ -4487,6 +4490,11 @@ msgstr ""
msgid "nicks in notify list"
msgstr "%s nem található ilyen mellőzés\n"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4533,6 +4541,12 @@ msgstr ""
"modulok elérési útvonala ('%h' helyére automatikusan a WeeChat saját "
"könyvtára, alapértelmezésben ~/.weechat, kerül)"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2743,6 +2743,9 @@ msgstr ""
"Se un'altra istanza di WeeChat usa questo file, eseguire WeeChat\n"
"con un'altra home usando l'opzione da riga di comando \"--dir\".\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "tipo di proxy (http (predefinito), socks4, socks5)"
@ -4881,6 +4884,11 @@ msgstr "numero di ignore definiti"
msgid "nicks in notify list"
msgstr "nick nella lista notifiche"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4934,6 +4942,12 @@ msgstr ""
"nick (\"%h\" sarà sostituito dalla home di WeeChat, \"~/.weechat come "
"predefinita)"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""
"dimensione della chiave utilizzata durante lo Scambio Chiavi Diffie-Hellman"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2677,6 +2677,9 @@ msgstr ""
"Jeżeli inny proces WeeChat używa tego pliku, spróbuj uruchomić WeeChat\n"
"w innym katalogu domowym używając w linii komend opcji \"--dir\".\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "typ proxy (http (domyślny), socks4, socks5)"
@ -4893,6 +4896,11 @@ msgstr "numery zdefiniowanych irgnorów"
msgid "nicks in notify list"
msgstr "nicki na liście powiadomień"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4945,6 +4953,12 @@ msgstr ""
"plik certyfikatu SSL używany do automatycznego uwierzytelnienia nicka (\"%h"
"\" zostanie zastąpione katalogiem domowym WeeChat, domyślnie \"~/.weechat\")"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""
"rozmiar klucza używanego podczas połączenia Wymiany Kluczy Diffie-Hellmana"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 11:22+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2600,6 +2600,9 @@ msgid ""
"with another home using \"--dir\" command line option.\n"
msgstr ""
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr ""
@ -4363,6 +4366,11 @@ msgstr ""
msgid "nicks in notify list"
msgstr ""
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4405,6 +4413,12 @@ msgid ""
"be replaced by WeeChat home, \"~/.weechat\" by default)"
msgstr ""
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2426,6 +2426,9 @@ msgstr ""
"WeeChat\n"
"с другой домашней директорией используя параметр \"--dir\".\n"
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr "тип proxy сервера (http (по-умолчанию), socks4, socks5)"
@ -4496,6 +4499,11 @@ msgstr ""
msgid "nicks in notify list"
msgstr "%s игнорирования не найдены\n"
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -4542,6 +4550,12 @@ msgstr ""
"путь поиска pluginов ('%h' заменяется на домашний каталог WeeChat, по "
"умолчанию - ~/.weechat)"
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-04-26 17:47+0200\n"
"POT-Creation-Date: 2011-04-28 11:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -2074,6 +2074,9 @@ msgid ""
"with another home using \"--dir\" command line option.\n"
msgstr ""
msgid "invalid priorities"
msgstr ""
msgid "proxy type (http (default), socks4, socks5)"
msgstr ""
@ -3823,6 +3826,11 @@ msgstr ""
msgid "nicks in notify list"
msgstr ""
#, c-format
msgid ""
"%s%s: invalid priorities string, error at this position in string: \"%s\""
msgstr ""
#, c-format
msgid ""
"%s%s: warning: server \"%s\" not found in configuration file, not deleted in "
@ -3865,6 +3873,12 @@ msgid ""
"be replaced by WeeChat home, \"~/.weechat\" by default)"
msgstr ""
msgid ""
"string with priorities for gnutls (for syntax, see documentation of function "
"gnutls_priority_init in gnutls manual, common strings are: \"PERFORMANCE\", "
"\"NORMAL\", \"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"
msgstr ""
msgid "size of the key used during the Diffie-Hellman Key Exchange"
msgstr ""

View File

@ -1638,9 +1638,10 @@ hook_process_run (struct t_hook *hook_process)
*/
struct t_hook *
hook_connect (struct t_weechat_plugin *plugin, const char *proxy, const char *address,
int port, int sock, int ipv6, void *gnutls_sess, void *gnutls_cb,
int gnutls_dhkey_size, const char *local_hostname,
hook_connect (struct t_weechat_plugin *plugin, const char *proxy,
const char *address, int port, int sock, int ipv6,
void *gnutls_sess, void *gnutls_cb, int gnutls_dhkey_size,
const char *gnutls_priorities, const char *local_hostname,
t_hook_callback_connect *callback, void *callback_data)
{
struct t_hook *new_hook;
@ -1651,6 +1652,7 @@ hook_connect (struct t_weechat_plugin *plugin, const char *proxy, const char *ad
(void) gnutls_sess;
(void) gnutls_cb;
(void) gnutls_dhkey_size;
(void) gnutls_priorities;
#endif
if ((sock < 0) || !address || (port <= 0) || !callback)
@ -1680,6 +1682,8 @@ hook_connect (struct t_weechat_plugin *plugin, const char *proxy, const char *ad
new_hook_connect->gnutls_sess = gnutls_sess;
new_hook_connect->gnutls_cb = gnutls_cb;
new_hook_connect->gnutls_dhkey_size = gnutls_dhkey_size;
new_hook_connect->gnutls_priorities = (gnutls_priorities) ?
strdup (gnutls_priorities) : NULL;
#endif
new_hook_connect->local_hostname = (local_hostname) ?
strdup (local_hostname) : NULL;
@ -3418,6 +3422,7 @@ hook_print_log ()
log_printf (" gnutls_sess . . . . . : 0x%lx", HOOK_CONNECT(ptr_hook, gnutls_sess));
log_printf (" gnutls_cb . . . . . . : 0x%lx", HOOK_CONNECT(ptr_hook, gnutls_cb));
log_printf (" gnutls_dhkey_size . . : %d", HOOK_CONNECT(ptr_hook, gnutls_dhkey_size));
log_printf (" gnutls_priorities . . : '%s'", HOOK_CONNECT(ptr_hook, gnutls_priorities));
#endif
log_printf (" local_hostname. . . . : '%s'", HOOK_CONNECT(ptr_hook, local_hostname));
log_printf (" child_read. . . . . . : %d", HOOK_CONNECT(ptr_hook, child_read));

View File

@ -221,6 +221,7 @@ struct t_hook_connect
gnutls_session_t *gnutls_sess; /* GnuTLS session (SSL connection) */
gnutls_callback_t *gnutls_cb; /* GnuTLS callback during handshake */
int gnutls_dhkey_size; /* Diffie Hellman Key Exchange size */
char *gnutls_priorities; /* GnuTLS priorities */
#endif
char *local_hostname; /* force local hostname (optional) */
int child_read; /* to read data in pipe from child */
@ -408,6 +409,7 @@ extern struct t_hook *hook_connect (struct t_weechat_plugin *plugin,
int port, int sock, int ipv6,
void *gnutls_session, void *gnutls_cb,
int gnutls_dhkey_size,
const char *gnutls_priorities,
const char *local_hostname,
t_hook_callback_connect *callback,
void *callback_data);

View File

@ -59,14 +59,6 @@ int network_init_ok = 0;
#ifdef HAVE_GNUTLS
gnutls_certificate_credentials gnutls_xcred; /* GnuTLS client credentials */
const int gnutls_cert_type_prio[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
#if LIBGNUTLS_VERSION_NUMBER >= 0x010700
const int gnutls_prot_prio[] = { GNUTLS_TLS1_2, GNUTLS_TLS1_1,
GNUTLS_TLS1_0, GNUTLS_SSL3, 0 };
#else
const int gnutls_prot_prio[] = { GNUTLS_TLS1_1, GNUTLS_TLS1_0,
GNUTLS_SSL3, 0 };
#endif
#endif
@ -1004,6 +996,10 @@ void
network_connect_with_fork (struct t_hook *hook_connect)
{
int child_pipe[2];
#ifdef HAVE_GNUTLS
int rc;
const char *pos_error;
#endif
#ifndef __CYGWIN__
pid_t pid;
#endif
@ -1012,20 +1008,27 @@ network_connect_with_fork (struct t_hook *hook_connect)
/* initialize GnuTLS if SSL asked */
if (HOOK_CONNECT(hook_connect, gnutls_sess))
{
if (gnutls_init (HOOK_CONNECT(hook_connect, gnutls_sess), GNUTLS_CLIENT) != 0)
if (gnutls_init (HOOK_CONNECT(hook_connect, gnutls_sess), GNUTLS_CLIENT) != GNUTLS_E_SUCCESS)
{
(void) (HOOK_CONNECT(hook_connect, callback))
(hook_connect->callback_data,
'0' + WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR,
WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR,
0, NULL, NULL);
unhook (hook_connect);
return;
}
gnutls_set_default_priority (*HOOK_CONNECT(hook_connect, gnutls_sess));
gnutls_certificate_type_set_priority (*HOOK_CONNECT(hook_connect, gnutls_sess),
gnutls_cert_type_prio);
gnutls_protocol_set_priority (*HOOK_CONNECT(hook_connect, gnutls_sess),
gnutls_prot_prio);
rc = gnutls_priority_set_direct (*HOOK_CONNECT(hook_connect, gnutls_sess),
HOOK_CONNECT(hook_connect, gnutls_priorities),
&pos_error);
if (rc != GNUTLS_E_SUCCESS)
{
(void) (HOOK_CONNECT(hook_connect, callback))
(hook_connect->callback_data,
WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR,
0, _("invalid priorities"), NULL);
unhook (hook_connect);
return;
}
gnutls_credentials_set (*HOOK_CONNECT(hook_connect, gnutls_sess),
GNUTLS_CRD_CERTIFICATE,
gnutls_xcred);
@ -1039,7 +1042,7 @@ network_connect_with_fork (struct t_hook *hook_connect)
{
(void) (HOOK_CONNECT(hook_connect, callback))
(hook_connect->callback_data,
'0' + WEECHAT_HOOK_CONNECT_MEMORY_ERROR,
WEECHAT_HOOK_CONNECT_MEMORY_ERROR,
0, NULL, NULL);
unhook (hook_connect);
return;
@ -1062,7 +1065,7 @@ network_connect_with_fork (struct t_hook *hook_connect)
case -1:
(void) (HOOK_CONNECT(hook_connect, callback))
(hook_connect->callback_data,
'0' + WEECHAT_HOOK_CONNECT_MEMORY_ERROR,
WEECHAT_HOOK_CONNECT_MEMORY_ERROR,
0, NULL, NULL);
unhook (hook_connect);
return;

View File

@ -800,6 +800,76 @@ irc_config_server_default_change_cb (void *data, struct t_config_option *option)
}
}
/*
* irc_config_check_gnutls_priorities: check string with GnuTLS priorities
* return NULL if ok, or pointer to char
* with error in string
*/
const char *
irc_config_check_gnutls_priorities (const char *priorities)
{
#ifdef HAVE_GNUTLS
gnutls_priority_t priority_cache;
const char *pos_error;
int rc;
if (!priorities || !priorities[0])
return NULL;
rc = gnutls_priority_init (&priority_cache, priorities, &pos_error);
if (rc == GNUTLS_E_SUCCESS)
return NULL;
if (pos_error)
return pos_error;
return priorities;
#else
/* make C compiler happy */
(void) priorities;
return NULL;
#endif
}
/*
* irc_config_server_check_value_cb: callback called to check a server option
* when it is modified
*/
int
irc_config_server_check_value_cb (void *data,
struct t_config_option *option,
const char *value)
{
int index_option;
const char *pos_error;
/* make C compiler happy */
(void) option;
index_option = irc_server_search_option (data);
if (index_option >= 0)
{
switch (index_option)
{
case IRC_SERVER_OPTION_SSL_PRIORITIES:
pos_error = irc_config_check_gnutls_priorities (value);
if (pos_error)
{
weechat_printf (NULL,
_("%s%s: invalid priorities string, error "
"at this position in string: \"%s\""),
weechat_prefix ("error"), IRC_PLUGIN_NAME,
pos_error);
return 0;
}
break;
}
}
return 1;
}
/*
* irc_config_server_change_cb: callback called when a server option is modified
*/
@ -1185,6 +1255,8 @@ irc_config_server_new_option (struct t_config_file *config_file,
const char *default_value,
const char *value,
int null_value_allowed,
void *callback_check_value,
void *callback_check_value_data,
void *callback_change,
void *callback_change_data)
{
@ -1202,7 +1274,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1214,7 +1286,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1226,7 +1298,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1238,7 +1310,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1252,7 +1324,22 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
case IRC_SERVER_OPTION_SSL_PRIORITIES:
new_option = weechat_config_new_option (
config_file, section,
option_name, "string",
N_("string with priorities for gnutls (for syntax, see "
"documentation of function gnutls_priority_init in gnutls "
"manual, common strings are: \"PERFORMANCE\", \"NORMAL\", "
"\"SECURE128\", \"SECURE256\", \"EXPORT\", \"NONE\")"),
NULL, 0, 0,
default_value, value,
null_value_allowed,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1264,7 +1351,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, INT_MAX,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1276,7 +1363,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1288,7 +1375,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1300,7 +1387,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
"plain|dh-blowfish", 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1312,7 +1399,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1324,7 +1411,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1337,7 +1424,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 1, 3600,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1349,7 +1436,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1361,7 +1448,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1373,7 +1460,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 1, 65535,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1385,7 +1472,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1397,7 +1484,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1409,7 +1496,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1422,7 +1509,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1437,7 +1524,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1450,7 +1537,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 3600,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1463,7 +1550,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1475,7 +1562,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1487,7 +1574,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 3600*24,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1502,7 +1589,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 1, 3600,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1516,7 +1603,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 60,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1530,7 +1617,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 60,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1543,7 +1630,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 60 * 24 * 7,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1556,7 +1643,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 1000000,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1569,7 +1656,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1582,7 +1669,7 @@ irc_config_server_new_option (struct t_config_file *config_file,
NULL, 0, 0,
default_value, value,
null_value_allowed,
NULL, NULL,
callback_check_value, callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1596,8 +1683,8 @@ irc_config_server_new_option (struct t_config_file *config_file,
default_value, value,
null_value_allowed,
(section == irc_config_section_server_default) ?
&irc_config_server_default_check_notify : NULL,
NULL,
&irc_config_server_default_check_notify : callback_check_value,
callback_check_value_data,
callback_change, callback_change_data,
NULL, NULL);
break;
@ -1782,6 +1869,8 @@ irc_config_server_create_default_options (struct t_config_section *section)
irc_server_option_default[i],
default_value,
0,
&irc_config_server_check_value_cb,
irc_server_option_string[i],
&irc_config_server_default_change_cb,
irc_server_option_string[i]);
}

View File

@ -154,6 +154,9 @@ extern struct t_hashtable *irc_config_hashtable_nick_color_force;
extern struct t_hashtable *irc_config_hashtable_nick_prefixes;
extern void irc_config_set_nick_colors ();
extern int irc_config_server_check_value_cb (void *data,
struct t_config_option *option,
const char *value);
extern void irc_config_server_change_cb (void *data,
struct t_config_option *option);
struct t_config_option *irc_config_server_new_option (struct t_config_file *config_file,
@ -163,6 +166,8 @@ struct t_config_option *irc_config_server_new_option (struct t_config_file *conf
const char *default_value,
const char *value,
int null_value_allowed,
void *callback_check_value,
void *callback_check_value_data,
void *callback_change,
void *callback_change_data);
extern int irc_config_init ();

View File

@ -220,6 +220,14 @@ irc_display_server (struct t_irc_server *server, int with_detail)
weechat_printf (NULL, " ssl_cert . . . . . . : %s'%s'",
IRC_COLOR_CHAT_VALUE,
weechat_config_string (server->options[IRC_SERVER_OPTION_SSL_CERT]));
/* ssl_priorities */
if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_SSL_PRIORITIES]))
weechat_printf (NULL, " ssl_priorities . . . : ('%s')",
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_SSL_PRIORITIES));
else
weechat_printf (NULL, " ssl_priorities . . . : %s'%s'",
IRC_COLOR_CHAT_VALUE,
weechat_config_string (server->options[IRC_SERVER_OPTION_SSL_PRIORITIES]));
/* ssl_dhkey_size */
if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_SSL_DHKEY_SIZE]))
weechat_printf (NULL, " ssl_dhkey_size . . . : (%d)",

View File

@ -66,7 +66,7 @@ struct t_irc_message *irc_msgq_last_msg = NULL;
char *irc_server_option_string[IRC_SERVER_NUM_OPTIONS] =
{ "addresses", "proxy", "ipv6",
"ssl", "ssl_cert", "ssl_dhkey_size", "ssl_verify",
"ssl", "ssl_cert", "ssl_priorities", "ssl_dhkey_size", "ssl_verify",
"password", "sasl_mechanism", "sasl_username", "sasl_password", "sasl_timeout",
"autoconnect", "autoreconnect", "autoreconnect_delay",
"nicks", "username", "realname", "local_hostname",
@ -80,7 +80,7 @@ char *irc_server_option_string[IRC_SERVER_NUM_OPTIONS] =
char *irc_server_option_default[IRC_SERVER_NUM_OPTIONS] =
{ "", "", "off",
"off", "", "2048", "on",
"off", "", "NORMAL", "2048", "on",
"", "plain", "", "", "15",
"off", "on", "10",
"", "", "", "",
@ -687,6 +687,8 @@ irc_server_alloc (const char *name)
NULL,
NULL,
1,
&irc_config_server_check_value_cb,
irc_server_option_string[i],
&irc_config_server_change_cb,
irc_server_option_string[i]);
irc_config_server_change_cb (irc_server_option_string[i],
@ -3359,6 +3361,7 @@ irc_server_connect (struct t_irc_server *server)
(server->ssl_connected) ? &server->gnutls_sess : NULL,
(server->ssl_connected) ? irc_server_gnutls_callback : NULL,
IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_SSL_DHKEY_SIZE),
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_SSL_PRIORITIES),
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_LOCAL_HOSTNAME),
&irc_server_connect_cb,
server);
@ -3368,7 +3371,7 @@ irc_server_connect (struct t_irc_server *server)
server->current_port,
server->sock,
IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_IPV6),
NULL, NULL, 0,
NULL, NULL, 0, NULL,
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_LOCAL_HOSTNAME),
&irc_server_connect_cb,
server);
@ -3976,6 +3979,9 @@ irc_server_add_to_infolist (struct t_infolist *infolist,
if (!weechat_infolist_new_var_string (ptr_item, "ssl_cert",
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_SSL_CERT)))
return 0;
if (!weechat_infolist_new_var_string (ptr_item, "ssl_priorities",
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_SSL_PRIORITIES)))
return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "ssl_dhkey_size",
IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_SSL_DHKEY_SIZE)))
return 0;
@ -4166,6 +4172,13 @@ irc_server_print_log ()
else
weechat_log_printf (" ssl_cert . . . . . . : '%s'",
weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_SSL_CERT]));
/* ssl_priorities */
if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_SSL_PRIORITIES]))
weechat_log_printf (" ssl_priorities . . . : null ('%s')",
IRC_SERVER_OPTION_STRING(ptr_server, IRC_SERVER_OPTION_SSL_PRIORITIES));
else
weechat_log_printf (" ssl_priorities . . . : '%s'",
weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_SSL_PRIORITIES]));
/* ssl_dhkey_size */
if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_SSL_DHKEY_SIZE]))
weechat_log_printf (" ssl_dhkey_size . . . : null ('%d')",

View File

@ -38,6 +38,7 @@ enum t_irc_server_option
IRC_SERVER_OPTION_IPV6, /* use IPv6 protocol */
IRC_SERVER_OPTION_SSL, /* SSL protocol */
IRC_SERVER_OPTION_SSL_CERT, /* client ssl certificate file */
IRC_SERVER_OPTION_SSL_PRIORITIES, /* gnutls priorities */
IRC_SERVER_OPTION_SSL_DHKEY_SIZE, /* Diffie Hellman key size */
IRC_SERVER_OPTION_SSL_VERIFY, /* check if the connection is trusted */
IRC_SERVER_OPTION_PASSWORD, /* password for server */

View File

@ -3729,6 +3729,7 @@ weechat_lua_api_hook_connect (lua_State *L)
NULL, /* gnutls session */
NULL, /* gnutls callback */
0, /* gnutls DH key size */
NULL, /* gnutls priorities */
local_hostname,
&weechat_lua_api_hook_connect_cb,
function,

View File

@ -3355,6 +3355,7 @@ XS (XS_weechat_api_hook_connect)
NULL, /* gnutls session */
NULL, /* gnutls callback */
0, /* gnutls DH key size */
NULL, /* gnutls priorities */
local_hostname,
&weechat_perl_api_hook_connect_cb,
function,

View File

@ -3547,6 +3547,7 @@ weechat_python_api_hook_connect (PyObject *self, PyObject *args)
NULL, /* gnutls session */
NULL, /* gnutls callback */
0, /* gnutls DH key size */
NULL, /* gnutls priorities */
local_hostname,
&weechat_python_api_hook_connect_cb,
function,

View File

@ -3856,6 +3856,7 @@ weechat_ruby_api_hook_connect (VALUE class, VALUE proxy, VALUE address,
NULL, /* gnutls session */
NULL, /* gnutls callback */
0, /* gnutls DH key size */
NULL, /* gnutls priorities */
c_local_hostname,
&weechat_ruby_api_hook_connect_cb,
c_function,

View File

@ -929,6 +929,7 @@ 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,
void *gnutls_cb, int gnutls_dhkey_size,
const char *gnutls_priorities,
const char *local_hostname,
int (*callback)(void *data, int status,
int gnutls_rc,
@ -946,8 +947,8 @@ script_api_hook_connect (struct t_weechat_plugin *weechat_plugin,
new_hook = weechat_hook_connect (proxy, address, port, sock, ipv6,
gnutls_sess, gnutls_cb, gnutls_dhkey_size,
local_hostname, callback,
new_script_callback);
gnutls_priorities, local_hostname,
callback, new_script_callback);
if (!new_hook)
{
script_callback_free_data (new_script_callback);

View File

@ -170,8 +170,10 @@ extern struct t_hook *script_api_hook_connect (struct t_weechat_plugin *weechat_
int port,
int sock,
int ipv6,
void *gnutls_sess, void *gnutls_cb,
void *gnutls_sess,
void *gnutls_cb,
int gnutls_dhkey_size,
const char *gnutls_priorities,
const char *local_hostname,
int (*callback)(void *data,
int status,

View File

@ -3814,6 +3814,7 @@ weechat_tcl_api_hook_connect (ClientData clientData, Tcl_Interp *interp,
NULL, /* gnutls session */
NULL, /* gnutls callback */
0, /* gnutls DH key size */
NULL, /* gnutls priorities */
local_hostname,
&weechat_tcl_api_hook_connect_cb,
function,

View File

@ -45,7 +45,7 @@ struct timeval;
*/
/* API version (used to check that plugin has same API and can be loaded) */
#define WEECHAT_PLUGIN_API_VERSION "20110426-01"
#define WEECHAT_PLUGIN_API_VERSION "20110428-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@ -471,6 +471,7 @@ struct t_weechat_plugin
int ipv6,
void *gnutls_sess, void *gnutls_cb,
int gnutls_dhkey_size,
const char *gnutls_priorities,
const char *local_hostname,
int (*callback)(void *data,
int status,
@ -1159,12 +1160,13 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
__callback, __callback_data)
#define weechat_hook_connect(__proxy, __address, __port, __sock, \
__ipv6, __gnutls_sess, __gnutls_cb, \
__gnutls_dhkey_size, __local_hostname, \
__callback, __data) \
__gnutls_dhkey_size, __gnutls_priorities, \
__local_hostname, __callback, __data) \
weechat_plugin->hook_connect(weechat_plugin, __proxy, __address, \
__port, __sock, __ipv6, __gnutls_sess, \
__gnutls_cb, __gnutls_dhkey_size, \
__local_hostname, __callback, __data)
__gnutls_priorities, __local_hostname, \
__callback, __data)
#define weechat_hook_print(__buffer, __tags, __msg, __strip__colors, \
__callback, __data) \
weechat_plugin->hook_print(weechat_plugin, __buffer, __tags, \