X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=lib-sys%2Fmutt_ssl.cpkg;h=17556c3d0a887557004d9d0d4c782b918e2c7387;hb=ee48d4232053aee30adb5afb48b147e31d7aedfa;hp=8ceeb60a93b28610d0b5836ee80a421019b348dc;hpb=612f19a8b9172f6c0b32d929a53e95c995f78b1e;p=apps%2Fmadmutt.git diff --git a/lib-sys/mutt_ssl.cpkg b/lib-sys/mutt_ssl.cpkg index 8ceeb60..17556c3 100644 --- a/lib-sys/mutt_ssl.cpkg +++ b/lib-sys/mutt_ssl.cpkg @@ -12,11 +12,8 @@ #include #include -#ifdef HAVE_GNUTLS_OPENSSL_H -#include -#endif -#include +#include #include #include "mutt.h" @@ -432,16 +429,18 @@ static void tls_fingerprint (gnutls_digest_algorithm algo, static char *tls_make_date (time_t t, char *s, ssize_t len) { - struct tm *l = gmtime (&t); - - if (l) - snprintf (s, len, "%s, %d %s %d %02d:%02d:%02d UTC", - Weekdays[l->tm_wday], l->tm_mday, Months[l->tm_mon], - l->tm_year + 1900, l->tm_hour, l->tm_min, l->tm_sec); - else - m_strcpy(s, len, _("[invalid date]")); + struct tm *l = gmtime(&t); + + if (l) { + const char *loc; + loc = setlocale(LC_TIME, "C"); + strftime(s, len, "%a, %d %b %Y %T UTC", l); + setlocale(LC_TIME, loc); + } else { + m_strcpy(s, len, _("[invalid date]")); + } - return (s); + return (s); } static int tls_check_stored_hostname (const gnutls_datum * cert, @@ -496,8 +495,6 @@ static int tls_check_certificate (CONNECTION * conn) { tlssockdata *data = conn->sockdata; gnutls_session state = data->state; - char helpstr[STRING]; - char buf[STRING]; char fpbuf[STRING]; ssize_t buflen; char dn_common_name[STRING]; @@ -791,13 +788,6 @@ static int tls_check_certificate (CONNECTION * conn) menu->keys = _("ro"); } - helpstr[0] = '\0'; - mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_GENERIC, OP_EXIT); - strncat (helpstr, buf, sizeof (helpstr)); - mutt_make_help (buf, sizeof (buf), _("Help"), MENU_GENERIC, OP_HELP); - strncat (helpstr, buf, sizeof (helpstr)); - menu->help = helpstr; - done = 0; set_option (OPTUNBUFFEREDINPUT); while (!done) {