summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-05-04 20:37:15 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-05-04 20:37:15 +0200
commite95fdc3a0a089133b01ea08d1fc23196b08c07ae (patch)
treefd66b43b74f6af570713b40e9a00e817f0aa67a0
parent9f0e7fb47ec2feb551a30b39dde114b1074acb16 (diff)
downloadweechat-e95fdc3a0a089133b01ea08d1fc23196b08c07ae.zip
core: display a warning when the file with certificate authorities is not found (option weechat.network.gnutls_ca_file)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po11
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po16
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/ja.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt.po10
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/tr.po10
-rw-r--r--po/weechat.pot10
-rw-r--r--src/core/wee-network.c25
15 files changed, 147 insertions, 16 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 90153fde9..47ac50c22 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -28,6 +28,7 @@ New features::
Bug fixes::
+ * core: display a warning when the file with certificate authorities is not found (option weechat.network.gnutls_ca_file)
* core: evaluate left/right part of comparison after split on the comparison operator in ${if:xxx} (issue #1627)
* core: prevent switching to start of visited buffers when jumping to next (issue #1591, issue #1592)
* core: recreate buflist and fset bars on /reload when WeeChat is started without configuration files (issue #1618)
diff --git a/po/cs.po b/po/cs.po
index ca959c0c8..793cdf2b3 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4321,6 +4321,14 @@ 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"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: nemůžu číst certifikát \"%s\""
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/de.po b/po/de.po
index b41b7f4ae..3f1f2a749 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-04-13 11:40+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5249,6 +5249,15 @@ msgstr ""
"Verwendung der \"--dir\" Kommandozeilenoption, WeeChat in einem anderen "
"Verzeichnis zu starten.\n"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr ""
+"%sgnutls: Zertifikat für Fingerprint (%s) konnte nicht berechnet werden"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr "Server Name Indication (SNI) konnte nicht gesetzt werden"
diff --git a/po/es.po b/po/es.po
index fc06a1769..cd0d4ed6b 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4516,6 +4516,14 @@ msgstr ""
"con otro directorio de inicio usando la opción de línea de comandos \"--dir"
"\"\n"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: no es posible leer el certificado \"%s\""
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index 8026b67e7..ac3ec4d92 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
-"PO-Revision-Date: 2021-04-11 09:29+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
+"PO-Revision-Date: 2021-05-04 20:35+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5120,6 +5120,18 @@ msgstr ""
"un autre répertoire de base en utilisant l'option de ligne de commande \"--"
"dir\".\n"
+#, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr ""
+"%sAttention : échec de chargement des autorités de certification depuis le "
+"fichier %s"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+"%sAttention : aucune autorité de certification chargée (fichier non trouvé : "
+"%s)"
+
msgid "set server name indication (SNI) failed"
msgstr "la définition de l'indication de nom de serveur (SNI) a échoué"
diff --git a/po/hu.po b/po/hu.po
index 3d9f42370..7607c17dd 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3878,6 +3878,14 @@ 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"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/it.po b/po/it.po
index e1c63eb9e..77d1b693e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4634,6 +4634,14 @@ 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"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: impossibile leggere il certificato \"%s\""
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/ja.po b/po/ja.po
index 22974fe04..f0f33c89a 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -4858,6 +4858,14 @@ msgstr ""
"他の WeeChat プロセスがこのファイルを使用している場合は、\n"
"\"--dir\" コマンドラインオプションをつけて WeeChat を起動してみてください。\n"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: 証明書指紋の計算に失敗しました (%s)"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr "サーバ名表示 (SNI) の設定に失敗しました"
diff --git a/po/pl.po b/po/pl.po
index f9e204e1b..8a5ae21ea 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-03-14 13:37+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -5004,6 +5004,14 @@ 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"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: nie udało się wyliczyć odcisku certyfikatu (%s)"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr "ustawianie wskaźnika nazwy serwera (SNI) się nie powiodło"
diff --git a/po/pt.po b/po/pt.po
index abdbebd24..82bd4636e 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -4893,6 +4893,14 @@ msgstr ""
"WeeChat\n"
"com outro diretório usando a opção \"--dir\" na linha de comandos.\n"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: falha ao calcular impressão digital do certificado (%s)"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr "falha ao definir indicação do nome de servidor (SNI)"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 5e26998b8..cb6e86d93 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-03-05 20:43+0100\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4506,6 +4506,14 @@ msgid ""
"with another home using the \"--dir\" command line option.\n"
msgstr ""
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sgnutls: não foi possível ler certificado \"%s\""
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 88cfe7b60..90a588646 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3908,6 +3908,14 @@ msgstr ""
"WeeChat\n"
"с другой домашней директорией используя параметр \"--dir\".\n"
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "Не могу записать лог-файл \"%s\"\n"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index 0c18c29cf..15e8099ba 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3520,6 +3520,14 @@ msgid ""
"with another home using the \"--dir\" command line option.\n"
msgstr ""
+#, fuzzy, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr "%sHata: dosya \"%s\" oluşturulamaz"
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 6c8adb26c..632a02251 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2021-04-11 09:28+0200\n"
+"POT-Creation-Date: 2021-05-04 20:34+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3509,6 +3509,14 @@ msgid ""
"with another home using the \"--dir\" command line option.\n"
msgstr ""
+#, c-format
+msgid "%sWarning: failed to load certificate authorities from file %s"
+msgstr ""
+
+#, c-format
+msgid "%sWarning: no certificate authorities loaded (file not found: %s)"
+msgstr ""
+
msgid "set server name indication (SNI) failed"
msgstr ""
diff --git a/src/core/wee-network.c b/src/core/wee-network.c
index eba23c909..056a0c2f6 100644
--- a/src/core/wee-network.c
+++ b/src/core/wee-network.c
@@ -61,6 +61,7 @@
#include "wee-config.h"
#include "wee-proxy.h"
#include "wee-string.h"
+#include "../gui/gui-chat.h"
#include "../plugins/plugin.h"
@@ -102,8 +103,28 @@ network_set_gnutls_ca_file ()
ca_path2 = string_replace (ca_path, "%h", weechat_home);
if (ca_path2)
{
- gnutls_certificate_set_x509_trust_file (gnutls_xcred, ca_path2,
- GNUTLS_X509_FMT_PEM);
+ if (access (ca_path2, R_OK) == 0)
+ {
+ if (gnutls_certificate_set_x509_trust_file (gnutls_xcred, ca_path2,
+ GNUTLS_X509_FMT_PEM) < 0)
+ {
+ gui_chat_printf (
+ NULL,
+ _("%sWarning: failed to load certificate authorities "
+ "from file %s"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
+ ca_path2);
+ }
+ }
+ else
+ {
+ gui_chat_printf (
+ NULL,
+ _("%sWarning: no certificate authorities loaded "
+ "(file not found: %s)"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
+ ca_path2);
+ }
free (ca_path2);
}
free (ca_path);