#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#ifdef HAVE_GNUTLS_OPENSSL_H
-#include <gnutls/openssl.h>
-#endif
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
#include <lib-ui/menu.h>
#include "mutt.h"
** the default from the GNUTLS library.
*/
- path_t cert_file = m_strdup("~/.cache/madmutt/certificates");
+ path_t cert_file = luaM_pathnew("~/.cache/madmutt/certificates");
/*
** .pp
** This variable specifies the file where the certificates you trust
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,
{
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];
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) {