projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify mutt_parse_date
[apps/madmutt.git]
/
mutt_ssl_gnutls.c
diff --git
a/mutt_ssl_gnutls.c
b/mutt_ssl_gnutls.c
index
91b03dd
..
61a2da8
100644
(file)
--- a/
mutt_ssl_gnutls.c
+++ b/
mutt_ssl_gnutls.c
@@
-21,6
+21,9
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
#include "mutt.h"
#include "mutt_socket.h"
#include "mutt.h"
#include "mutt_socket.h"
@@
-28,9
+31,6
@@
#include "mutt_menu.h"
#include "mutt_ssl.h"
#include "mutt_menu.h"
#include "mutt_ssl.h"
-#include "lib/mem.h"
-#include "lib/str.h"
-#include "lib/intl.h"
#include "lib/rx.h"
typedef struct _tlssockdata {
#include "lib/rx.h"
typedef struct _tlssockdata {
@@
-382,7
+382,7
@@
static char *tls_make_date (time_t t, char *s, size_t len)
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
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
-
strfcpy (s, _("[invalid date]"), len
);
+
m_strcpy(s, len, _("[invalid date]")
);
return (s);
}
return (s);
}
@@
-416,8
+416,8
@@
static int tls_check_stored_hostname (const gnutls_datum * cert,
if (regexec (&preg, linestr, 3, pmatch, 0) == 0) {
linestr[pmatch[1].rm_eo] = '\0';
linestr[pmatch[2].rm_eo] = '\0';
if (regexec (&preg, linestr, 3, pmatch, 0) == 0) {
linestr[pmatch[1].rm_eo] = '\0';
linestr[pmatch[2].rm_eo] = '\0';
- if (
str_cmp
(linestr + pmatch[1].rm_so, hostname) == 0 &&
-
str_cmp
(linestr + pmatch[2].rm_so, buf) == 0) {
+ if (
m_strcmp
(linestr + pmatch[1].rm_so, hostname) == 0 &&
+
m_strcmp
(linestr + pmatch[2].rm_so, buf) == 0) {
regfree (&preg);
p_delete(&linestr);
fclose (fp);
regfree (&preg);
p_delete(&linestr);
fclose (fp);
@@
-592,8
+592,8
@@
static int tls_check_certificate (CONNECTION * conn)
menu->dialog[i] = p_new(char, SHORT_STRING);
row = 0;
menu->dialog[i] = p_new(char, SHORT_STRING);
row = 0;
-
strfcpy (menu->dialog[row], _("This certificate belongs to:")
,
-
SHORT_STRING
);
+
m_strcpy(menu->dialog[row], SHORT_STRING
,
+
_("This certificate belongs to:")
);
row++;
buflen = sizeof (dn_common_name);
row++;
buflen = sizeof (dn_common_name);
@@
-637,8
+637,8
@@
static int tls_check_certificate (CONNECTION * conn)
dn_province, dn_country);
row++;
dn_province, dn_country);
row++;
-
strfcpy (menu->dialog[row], _("This certificate was issued by:")
,
-
SHORT_STRING
);
+
m_strcpy(menu->dialog[row], SHORT_STRING
,
+
_("This certificate was issued by:")
);
row++;
buflen = sizeof (dn_common_name);
row++;
buflen = sizeof (dn_common_name);
@@
-704,30
+704,28
@@
static int tls_check_certificate (CONNECTION * conn)
if (certerr_notyetvalid) {
row++;
if (certerr_notyetvalid) {
row++;
-
strfcpy (menu->dialog[row]
,
- _("WARNING: Server certificate is not yet valid")
, SHORT_STRING
);
+
m_strcpy(menu->dialog[row], SHORT_STRING
,
+ _("WARNING: Server certificate is not yet valid"));
}
if (certerr_expired) {
row++;
}
if (certerr_expired) {
row++;
-
strfcpy (menu->dialog[row], _("WARNING: Server certificate has expired")
,
-
SHORT_STRING
);
+
m_strcpy(menu->dialog[row], SHORT_STRING
,
+
_("WARNING: Server certificate has expired")
);
}
if (certerr_revoked) {
row++;
}
if (certerr_revoked) {
row++;
-
strfcpy (menu->dialog[row]
,
- _("WARNING: Server certificate has been revoked")
, SHORT_STRING
);
+
m_strcpy(menu->dialog[row], SHORT_STRING
,
+ _("WARNING: Server certificate has been revoked"));
}
if (certerr_hostname) {
row++;
}
if (certerr_hostname) {
row++;
- strfcpy (menu->dialog[row],
- _("WARNING: Server hostname does not match certificate"),
- SHORT_STRING);
+ m_strcpy(menu->dialog[row], SHORT_STRING,
+ _("WARNING: Server hostname does not match certificate"));
}
if (certerr_signernotca) {
row++;
}
if (certerr_signernotca) {
row++;
- strfcpy (menu->dialog[row],
- _("WARNING: Signer of server certificate is not a CA"),
- SHORT_STRING);
+ m_strcpy(menu->dialog[row], SHORT_STRING,
+ _("WARNING: Signer of server certificate is not a CA"));
}
menu->title = _("TLS/SSL Certificate check");
}
menu->title = _("TLS/SSL Certificate check");