diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | doc/en/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | doc/fr/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | doc/it/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | doc/ja/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | doc/pl/autogen/plugin_api/hdata.adoc | 2 | ||||
-rw-r--r-- | po/cs.po | 8 | ||||
-rw-r--r-- | po/de.po | 8 | ||||
-rw-r--r-- | po/es.po | 8 | ||||
-rw-r--r-- | po/fr.po | 8 | ||||
-rw-r--r-- | po/hu.po | 4 | ||||
-rw-r--r-- | po/it.po | 8 | ||||
-rw-r--r-- | po/ja.po | 8 | ||||
-rw-r--r-- | po/pl.po | 8 | ||||
-rw-r--r-- | po/pt.po | 8 | ||||
-rw-r--r-- | po/pt_BR.po | 8 | ||||
-rw-r--r-- | po/ru.po | 4 | ||||
-rw-r--r-- | po/tr.po | 4 | ||||
-rw-r--r-- | po/weechat.pot | 4 | ||||
-rw-r--r-- | src/plugins/script/script-buffer.c | 6 | ||||
-rw-r--r-- | src/plugins/script/script-mouse.c | 2 | ||||
-rw-r--r-- | src/plugins/script/script-repo.c | 55 | ||||
-rw-r--r-- | src/plugins/script/script-repo.h | 2 |
24 files changed, 85 insertions, 81 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index cc4b832a3..cb2af88bc 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -24,6 +24,7 @@ New features:: * api: add function command_options (issue #928) * api: add function string_match_list * relay: add option relay.weechat.commands (issue #928) + * script: use SHA-512 instead of MD5 for script checksum * spell: rename aspell plugin to spell (issue #1299) Bug fixes:: diff --git a/doc/de/autogen/plugin_api/hdata.adoc b/doc/de/autogen/plugin_api/hdata.adoc index e54015072..9867fab49 100644 --- a/doc/de/autogen/plugin_api/hdata.adoc +++ b/doc/de/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + diff --git a/doc/en/autogen/plugin_api/hdata.adoc b/doc/en/autogen/plugin_api/hdata.adoc index ffe44381c..5037f0354 100644 --- a/doc/en/autogen/plugin_api/hdata.adoc +++ b/doc/en/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + diff --git a/doc/fr/autogen/plugin_api/hdata.adoc b/doc/fr/autogen/plugin_api/hdata.adoc index 980d76ad7..3e6a2a0f6 100644 --- a/doc/fr/autogen/plugin_api/hdata.adoc +++ b/doc/fr/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + diff --git a/doc/it/autogen/plugin_api/hdata.adoc b/doc/it/autogen/plugin_api/hdata.adoc index ce2b8f637..b87252f90 100644 --- a/doc/it/autogen/plugin_api/hdata.adoc +++ b/doc/it/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + diff --git a/doc/ja/autogen/plugin_api/hdata.adoc b/doc/ja/autogen/plugin_api/hdata.adoc index eb2cefcc9..d1cb6834b 100644 --- a/doc/ja/autogen/plugin_api/hdata.adoc +++ b/doc/ja/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + diff --git a/doc/pl/autogen/plugin_api/hdata.adoc b/doc/pl/autogen/plugin_api/hdata.adoc index e57e4314a..98f38b483 100644 --- a/doc/pl/autogen/plugin_api/hdata.adoc +++ b/doc/pl/autogen/plugin_api/hdata.adoc @@ -429,7 +429,7 @@ _tags_ (string) + _requirements_ (string) + _min_weechat_ (string) + _max_weechat_ (string) + -_md5sum_ (string) + +_sha512sum_ (string) + _url_ (string) + _popularity_ (integer) + _date_added_ (time) + @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:18+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: cs\n" @@ -11151,8 +11151,8 @@ msgstr "Datum aktualizovováno" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Vyžaduje" @@ -24,8 +24,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:18+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" "Language: de\n" @@ -13062,8 +13062,8 @@ msgstr "letztes Update" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Benötigt" @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:18+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: es\n" @@ -11498,8 +11498,8 @@ msgstr "Fecha actualizada" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Requiere" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:22+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -12789,8 +12789,8 @@ msgstr "Date de mise à jour" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "SHA-512" msgid "Requires" msgstr "Requiert" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" "PO-Revision-Date: 2019-02-28 20:18+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10511,7 +10511,7 @@ msgstr "A \"%s\" => \"%s\" aliasz elkészült\n" msgid "URL" msgstr "" -msgid "MD5" +msgid "SHA-512" msgstr "" msgid "Requires" @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:18+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: it\n" @@ -11704,8 +11704,8 @@ msgstr "Data di aggiornamento" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Richiede" @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:18+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "translation/ja_JP>\n" @@ -12332,8 +12332,8 @@ msgstr "日時が更新されました" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "依存" @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" "Language: pl\n" @@ -12518,8 +12518,8 @@ msgstr "Data aktualizacji" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Wymaga" @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" "Language: pt\n" @@ -12173,8 +12173,8 @@ msgstr "Data de atualização" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "Requer" diff --git a/po/pt_BR.po b/po/pt_BR.po index 421cebb1b..df7c74b70 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" -"PO-Revision-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" +"PO-Revision-Date: 2019-02-28 20:53+0100\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: pt_BR\n" @@ -10960,8 +10960,8 @@ msgstr "Data atualizada" msgid "URL" msgstr "URL" -msgid "MD5" -msgstr "MD5" +msgid "SHA-512" +msgstr "" msgid "Requires" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" "PO-Revision-Date: 2019-02-28 20:19+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10546,7 +10546,7 @@ msgstr "Сокращение \"%s\" => \"%s\" создано\n" msgid "URL" msgstr "" -msgid "MD5" +msgid "SHA-512" msgstr "" msgid "Requires" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\n" "PO-Revision-Date: 2019-01-29 21:05+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9591,7 +9591,7 @@ msgstr "Tarih güncellendi" msgid "URL" msgstr "" -msgid "MD5" +msgid "SHA-512" msgstr "" msgid "Requires" diff --git a/po/weechat.pot b/po/weechat.pot index 042a2d12d..e97398512 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: 2019-02-28 20:19+0100\n" +"POT-Creation-Date: 2019-02-28 20:53+0100\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" @@ -9459,7 +9459,7 @@ msgstr "" msgid "URL" msgstr "" -msgid "MD5" +msgid "SHA-512" msgstr "" msgid "Requires" diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index 06835f96d..e2871f757 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -601,8 +601,8 @@ script_buffer_display_detail_script (struct t_script_repo *script) char *labels[] = { N_("Script"), N_("Version"), N_("Version loaded"), N_("Author"), N_("License"), N_("Description"), N_("Tags"), N_("Status"), N_("Date added"), - N_("Date updated"), N_("URL"), N_("MD5"), N_("Requires"), - N_("Min WeeChat"), N_("Max WeeChat"), + N_("Date updated"), N_("URL"), N_("SHA-512"), + N_("Requires"), N_("Min WeeChat"), N_("Max WeeChat"), NULL }; int i, length, max_length, line; struct t_weelist *list; @@ -697,7 +697,7 @@ script_buffer_display_detail_script (struct t_script_repo *script) weechat_printf_y (script_buffer, line + 1, "%s: %s", script_buffer_detail_label (_(labels[line]), max_length), - script->md5sum); + (script->sha512sum) ? script->sha512sum : "-"); line++; weechat_printf_y (script_buffer, line + 1, "%s: %s", diff --git a/src/plugins/script/script-mouse.c b/src/plugins/script/script-mouse.c index abcfb3f53..710d406ba 100644 --- a/src/plugins/script/script-mouse.c +++ b/src/plugins/script/script-mouse.c @@ -95,7 +95,7 @@ script_mouse_focus_chat_cb (const void *pointer, void *data, weechat_hashtable_set (info, "script_requirements", ptr_script->requirements); weechat_hashtable_set (info, "script_min_weechat", ptr_script->min_weechat); weechat_hashtable_set (info, "script_max_weechat", ptr_script->max_weechat); - weechat_hashtable_set (info, "script_md5sum", ptr_script->md5sum); + weechat_hashtable_set (info, "script_sha512sum", ptr_script->sha512sum); weechat_hashtable_set (info, "script_url", ptr_script->url); tm = localtime (&ptr_script->date_added); if (strftime (str_date, sizeof (str_date), "%Y-%m-%d %H:%M:%S", tm) == 0) diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index 1f0844959..272eef28e 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -385,7 +385,7 @@ script_repo_alloc () new_script->requirements = NULL; new_script->min_weechat = NULL; new_script->max_weechat = NULL; - new_script->md5sum = NULL; + new_script->sha512sum = NULL; new_script->url = NULL; new_script->popularity = 0; new_script->date_added = 0; @@ -636,8 +636,8 @@ script_repo_free (struct t_script_repo *script) free (script->min_weechat); if (script->max_weechat) free (script->max_weechat); - if (script->md5sum) - free (script->md5sum); + if (script->sha512sum) + free (script->sha512sum); if (script->url) free (script->url); if (script->version_loaded) @@ -740,23 +740,23 @@ script_repo_script_is_held (struct t_script_repo *script) } /* - * Computes MD5 checksum for the content of a file. + * Computes SHA-512 checksum for the content of a file. * * Note: result must be freed after use. */ char * -script_repo_md5sum_file (const char *filename) +script_repo_sha512sum_file (const char *filename) { struct stat st; FILE *file; - char md5sum[512]; + char sha512sum[512]; const char *hexa = "0123456789abcdef"; unsigned char *data, *result; gcry_md_hd_t hd; int mdlen, i; - md5sum[0] = '\0'; + sha512sum[0] = '\0'; if (stat (filename, &st) == -1) return NULL; @@ -774,21 +774,21 @@ script_repo_md5sum_file (const char *filename) } fclose (file); - gcry_md_open (&hd, GCRY_MD_MD5, 0); - mdlen = gcry_md_get_algo_dlen (GCRY_MD_MD5); + gcry_md_open (&hd, GCRY_MD_SHA512, 0); + mdlen = gcry_md_get_algo_dlen (GCRY_MD_SHA512); gcry_md_write (hd, data, st.st_size); - result = gcry_md_read (hd, GCRY_MD_MD5); + result = gcry_md_read (hd, GCRY_MD_SHA512); for (i = 0; i < mdlen; i++) { - md5sum[i * 2] = hexa[(result[i] & 0xFF) / 16]; - md5sum[(i * 2) + 1] = hexa[(result[i] & 0xFF) % 16]; + sha512sum[i * 2] = hexa[(result[i] & 0xFF) / 16]; + sha512sum[(i * 2) + 1] = hexa[(result[i] & 0xFF) % 16]; } - md5sum[((mdlen - 1) * 2) + 2] = '\0'; + sha512sum[((mdlen - 1) * 2) + 2] = '\0'; gcry_md_close (hd); free (data); - return strdup (md5sum); + return strdup (sha512sum); } /* @@ -802,13 +802,13 @@ void script_repo_update_status (struct t_script_repo *script) { const char *weechat_home, *version; - char *filename, *md5sum; + char *filename, *sha512sum; struct stat st; int length; struct t_script_repo *ptr_script; script->status = 0; - md5sum = NULL; + sha512sum = NULL; /* check if script is installed (file found on disk) */ weechat_home = weechat_info_get ("weechat_dir", NULL); @@ -824,7 +824,7 @@ script_repo_update_status (struct t_script_repo *script) { script->status |= SCRIPT_STATUS_INSTALLED; script->status |= SCRIPT_STATUS_AUTOLOADED; - md5sum = script_repo_md5sum_file (filename); + sha512sum = script_repo_sha512sum_file (filename); } else { @@ -835,7 +835,7 @@ script_repo_update_status (struct t_script_repo *script) if (stat (filename, &st) == 0) { script->status |= SCRIPT_STATUS_INSTALLED; - md5sum = script_repo_md5sum_file (filename); + sha512sum = script_repo_sha512sum_file (filename); } } free (filename); @@ -864,8 +864,11 @@ script_repo_update_status (struct t_script_repo *script) } /* check if script has new version (script is obsolete) */ - if (md5sum && script->md5sum && (strcmp (script->md5sum, md5sum) != 0)) + if (sha512sum && script->sha512sum + && (strcmp (script->sha512sum, sha512sum) != 0)) + { script->status |= SCRIPT_STATUS_NEW_VERSION; + } /* recompute max length for version loaded (for display) */ if (script_repo_max_length_field) @@ -880,8 +883,8 @@ script_repo_update_status (struct t_script_repo *script) } } - if (md5sum) - free (md5sum); + if (sha512sum) + free (sha512sum); } /* @@ -1335,8 +1338,8 @@ script_repo_file_read (int quiet) script->min_weechat = strdup (value); else if (strcmp (name, "max_weechat") == 0) script->max_weechat = strdup (value); - else if (strcmp (name, "md5sum") == 0) - script->md5sum = strdup (value); + else if (strcmp (name, "sha512sum") == 0) + script->sha512sum = strdup (value); else if (strcmp (name, "url") == 0) script->url = strdup (value); else if (strcmp (name, "popularity") == 0) @@ -1546,7 +1549,7 @@ script_repo_hdata_script_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_script_repo, requirements, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_script_repo, min_weechat, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_script_repo, max_weechat, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_script_repo, md5sum, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, sha512sum, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_script_repo, url, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_script_repo, popularity, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_script_repo, date_added, TIME, 0, NULL, NULL); @@ -1608,7 +1611,7 @@ script_repo_add_to_infolist (struct t_infolist *infolist, return 0; if (!weechat_infolist_new_var_string (ptr_item, "max_weechat", script->max_weechat)) return 0; - if (!weechat_infolist_new_var_string (ptr_item, "md5sum", script->md5sum)) + if (!weechat_infolist_new_var_string (ptr_item, "sha512sum", script->sha512sum)) return 0; if (!weechat_infolist_new_var_string (ptr_item, "url", script->url)) return 0; @@ -1656,7 +1659,7 @@ script_repo_print_log () weechat_log_printf (" requirements. . . . . : '%s'", ptr_script->requirements); weechat_log_printf (" min_weechat . . . . . : '%s'", ptr_script->min_weechat); weechat_log_printf (" max_weechat . . . . . : '%s'", ptr_script->max_weechat); - weechat_log_printf (" md5sum. . . . . . . . : '%s'", ptr_script->md5sum); + weechat_log_printf (" sha512sum . . . . . . : '%s'", ptr_script->sha512sum); weechat_log_printf (" url . . . . . . . . . : '%s'", ptr_script->url); weechat_log_printf (" popularity. . . . . . : %d", ptr_script->popularity); weechat_log_printf (" date_added. . . . . . : %lld", (long long)ptr_script->date_added); diff --git a/src/plugins/script/script-repo.h b/src/plugins/script/script-repo.h index 907f5e9fe..fe9fe266a 100644 --- a/src/plugins/script/script-repo.h +++ b/src/plugins/script/script-repo.h @@ -43,7 +43,7 @@ struct t_script_repo char *requirements; /* requirements */ char *min_weechat; /* min WeeChat version */ char *max_weechat; /* max WeeChat version */ - char *md5sum; /* md5sum of script content */ + char *sha512sum; /* SHA-512 checksum of script */ char *url; /* URL to download script */ int popularity; /* >0 for popular scripts only */ time_t date_added; /* date added */ |