diff --git a/ChangeLog b/ChangeLog index 420fcdd8c..d56b845e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.3-dev, 2010-07-18 +v0.3.3-dev, 2010-07-25 Version 0.3.3 (under dev!) @@ -25,6 +25,7 @@ Version 0.3.3 (under dev!) * api: add function "string_expand_home", fix bug with replacement of home in paths * irc: add new option irc.look.nick_color_stop_chars +* irc: fix import of certificates created by openssl >= 1.0.0 (bug #30316) * irc: fix display of local SSL certificate when it is sent to server (patch #7218) * irc: improve lag indicator: two colors (counting and finished), update item diff --git a/po/cs.po b/po/cs.po index aff437fb2..928d05ee1 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-07-18 17:02+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -5388,6 +5388,10 @@ msgstr "%sguntls: jméno hosta v certifikátu NODPOVÍDÁ \"%s\"" msgid "gnutls: sending one certificate" msgstr "gnutls: posílám jeden certifikát" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: nemůžu číst certifikát \"%s\"" + #, c-format msgid " - client certificate info (%s):" msgstr " - informace o certifikátu klienta (%s):" diff --git a/po/de.po b/po/de.po index 6d6fe0025..4a3185a3f 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-07-19 15:12+0200\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev \n" @@ -5574,6 +5574,10 @@ msgstr "%sgnutls: Der Hostname im Zertifikat \"%s\" stimmt NICHT überein." msgid "gnutls: sending one certificate" msgstr "gnutls: Sende ein Zertifikat" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: Kann das Zertifikat \"%s\" nicht lesen" + #, c-format msgid " - client certificate info (%s):" msgstr " - Client Zertifikate-Information (%s):" diff --git a/po/es.po b/po/es.po index 4ca284ba8..9abf966ab 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-06-20 21:24+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5429,6 +5429,10 @@ msgstr "%sgnutls: el hostname en el certificado NO concuerda con \"%s\"" msgid "gnutls: sending one certificate" msgstr "gnutls: enviando un certificado" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: no es posible leer el certificado \"%s\"" + #, c-format msgid " - client certificate info (%s):" msgstr " - información del certificado del cliente (%s):" diff --git a/po/fr.po b/po/fr.po index 5f16816ae..e955384cf 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" -"PO-Revision-Date: 2010-07-17 21:35+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" +"PO-Revision-Date: 2010-07-25 12:52+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -5487,6 +5487,10 @@ msgstr "%sgnutls: le nom d'hôte du certificat ne correspond PAS à \"%s\"" msgid "gnutls: sending one certificate" msgstr "gnutls: envoi d'un certificat" +#, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: certificat invalide \"%s\", erreur: %s" + #, c-format msgid " - client certificate info (%s):" msgstr " - info certificat client (%s):" diff --git a/po/hu.po b/po/hu.po index d287a6fe3..39544cdd8 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-06-20 21:24+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5156,6 +5156,10 @@ msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" msgid "gnutls: sending one certificate" msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" + #, c-format msgid " - client certificate info (%s):" msgstr "" diff --git a/po/it.po b/po/it.po index e101d8d2c..f7249ec4d 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-07-19 15:12+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -5448,6 +5448,10 @@ msgstr "%sgnutls: il nome host nel certificato NON coincide \"%s\"" msgid "gnutls: sending one certificate" msgstr "gnutls: invio di un certificato" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: impossibile leggere il certificato \"%s\"" + #, c-format msgid " - client certificate info (%s):" msgstr " - info sul certificato (%s) del client:" diff --git a/po/pl.po b/po/pl.po index 73c9ad61b..375855cca 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-06-20 21:25+0200\n" "Last-Translator: B.J. Stobiecki \n" "Language-Team: weechat-dev \n" @@ -5407,6 +5407,10 @@ msgstr "%sgnutls: nazwa hosta w certyfikacie NIE pasuje do \"%s\"" msgid "gnutls: sending one certificate" msgstr "gnutls: wysyłam jeden certyfikat" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "%sgnutls: nie można odczytać certyfikatu \"%s\"" + #, c-format msgid " - client certificate info (%s):" msgstr " - informacje o certyfikacie klienta (%s):" diff --git a/po/ru.po b/po/ru.po index f3c2f0bc4..1a18d6987 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: 2010-06-20 21:25+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -5171,6 +5171,10 @@ msgstr "Не могу записать лог-файл \"%s\"\n" msgid "gnutls: sending one certificate" msgstr "Не могу записать лог-файл \"%s\"\n" +#, fuzzy, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "Не могу записать лог-файл \"%s\"\n" + #, c-format msgid " - client certificate info (%s):" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 3216d5a7c..aaa5ceea0 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-07-19 15:16+0200\n" +"POT-Creation-Date: 2010-07-25 12:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -4471,6 +4471,10 @@ msgstr "" msgid "gnutls: sending one certificate" msgstr "" +#, c-format +msgid "%sgnutls: invalid certificate \"%s\", error: %s" +msgstr "" + #, c-format msgid " - client certificate info (%s):" msgstr "" diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index ab26e6224..818891f72 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -2536,7 +2536,7 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session, time_t cert_time; char *cert_path0, *cert_path1, *cert_path2, *cert_str, *hostname; const char *weechat_dir; - int rc, i, j, hostname_match; + int rc, ret, i, j, hostname_match; #if LIBGNUTLS_VERSION_NUMBER >= 0x010706 gnutls_datum_t cinfo; int rinfo; @@ -2695,36 +2695,56 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session, /* key */ gnutls_x509_privkey_init (&server->tls_cert_key); - gnutls_x509_privkey_import (server->tls_cert_key, &filedatum, - GNUTLS_X509_FMT_PEM); - - tls_struct.type = GNUTLS_CRT_X509; - tls_struct.ncerts = 1; - tls_struct.deinit_all = 0; - tls_struct.cert.x509 = &server->tls_cert; - tls_struct.key.x509 = server->tls_cert_key; -#if LIBGNUTLS_VERSION_NUMBER >= 0x010706 - /* client certificate info */ -#if LIBGNUTLS_VERSION_NUMBER < 0x020400 - rinfo = gnutls_x509_crt_print (server->tls_cert, - GNUTLS_X509_CRT_ONELINE, - &cinfo); -#else - rinfo = gnutls_x509_crt_print (server->tls_cert, - GNUTLS_CRT_PRINT_ONELINE, - &cinfo); -#endif - if (rinfo == 0) + ret = gnutls_x509_privkey_import (server->tls_cert_key, + &filedatum, + GNUTLS_X509_FMT_PEM); + if (ret < 0) + { + ret = gnutls_x509_privkey_import_pkcs8 (server->tls_cert_key, + &filedatum, + GNUTLS_X509_FMT_PEM, + NULL, + GNUTLS_PKCS_PLAIN); + } + if (ret < 0) { weechat_printf (server->buffer, - _(" - client certificate info (%s):"), - cert_path2); - weechat_printf (server->buffer, " - %s", cinfo.data); - gnutls_free (cinfo.data); + _("%sgnutls: invalid certificate \"%s\", " + "error: %s"), + weechat_prefix ("error"), cert_path2, + gnutls_strerror (ret)); + rc = -1; } + else + { + tls_struct.type = GNUTLS_CRT_X509; + tls_struct.ncerts = 1; + tls_struct.deinit_all = 0; + tls_struct.cert.x509 = &server->tls_cert; + tls_struct.key.x509 = server->tls_cert_key; +#if LIBGNUTLS_VERSION_NUMBER >= 0x010706 + /* client certificate info */ +#if LIBGNUTLS_VERSION_NUMBER < 0x020400 + rinfo = gnutls_x509_crt_print (server->tls_cert, + GNUTLS_X509_CRT_ONELINE, + &cinfo); +#else + rinfo = gnutls_x509_crt_print (server->tls_cert, + GNUTLS_CRT_PRINT_ONELINE, + &cinfo); #endif - memcpy (answer, &tls_struct, sizeof (gnutls_retr_st)); - free (cert_str); + if (rinfo == 0) + { + weechat_printf (server->buffer, + _(" - client certificate info (%s):"), + cert_path2); + weechat_printf (server->buffer, " - %s", cinfo.data); + gnutls_free (cinfo.data); + } +#endif + memcpy (answer, &tls_struct, sizeof (gnutls_retr_st)); + free (cert_str); + } } else {