1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 17:45:41 +02:00

script: use SHA-512 instead of MD5 for script checksum

Related to weechat/weechat.org@66a8b72ab1
This commit is contained in:
Sébastien Helleu
2019-02-28 20:55:10 +01:00
parent d290de2cba
commit c91e47c414
24 changed files with 85 additions and 81 deletions
+3 -3
View File
@@ -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",
+1 -1
View File
@@ -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)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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 */