X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_ssl.c;h=aadbf7a9cea2c942a70073c0846d486ca488feb0;hp=804183cf0138cea306165d69609b8638ffbab598;hb=dbb9a1e16d03a2d4664d6dc6a30c721b889d4982;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd diff --git a/mutt_ssl.c b/mutt_ssl.c index 804183c..aadbf7a 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -24,10 +24,11 @@ #include #include +#include + #include "mutt.h" #include "mutt_socket.h" #include "mutt_menu.h" -#include "mutt_curses.h" #include "mutt_ssl.h" #include "lib/debug.h" @@ -412,7 +413,7 @@ static char *x509_get_part (char *line, const char *ndx) static char ret[SHORT_STRING]; char *c, *c2; - strfcpy (ret, _("Unknown"), sizeof (ret)); + m_strcpy(ret, sizeof(ret), _("Unknown")); c = strstr (line, ndx); if (c) { @@ -420,7 +421,7 @@ static char *x509_get_part (char *line, const char *ndx) c2 = strchr (c, '/'); if (c2) *c2 = '\0'; - strfcpy (ret, c, sizeof (ret)); + m_strcpy(ret, sizeof(ret), c); if (c2) *c2 = '/'; } @@ -435,14 +436,14 @@ static void x509_fingerprint (char *s, int l, X509 * cert) int j; if (!X509_digest (cert, EVP_md5 (), md, &n)) { - snprintf (s, l, "%s", _("[unable to calculate]")); + m_strcpy(s, l, _("[unable to calculate]")); } else { for (j = 0; j < (int) n; j++) { char ch[8]; - snprintf (ch, 8, "%02X%s", md[j], (j % 2 ? " " : "")); - str_cat (s, l, ch); + snprintf(ch, 8, "%02X%s", md[j], (j % 2 ? " " : "")); + m_strcat(s, l, ch); } } } @@ -452,7 +453,7 @@ static char *asn1time_to_string (ASN1_UTCTIME * tm) static char buf[64]; BIO *bio; - strfcpy (buf, _("[invalid date]"), sizeof (buf)); + m_strcpy(buf, sizeof(buf), _("[invalid date]")); bio = BIO_new (BIO_s_mem ()); if (bio) { @@ -588,8 +589,8 @@ static int ssl_check_certificate (sslsockdata * data) 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++; name = X509_NAME_oneline (X509_get_subject_name (data->cert), buf, sizeof (buf)); @@ -599,8 +600,8 @@ static int ssl_check_certificate (sslsockdata * data) } 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++; name = X509_NAME_oneline (X509_get_issuer_name (data->cert), buf, sizeof (buf)); @@ -636,9 +637,9 @@ static int ssl_check_certificate (sslsockdata * data) helpstr[0] = '\0'; mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_GENERIC, OP_EXIT); - str_cat (helpstr, sizeof (helpstr), buf); + m_strcat(helpstr, sizeof(helpstr), buf); mutt_make_help (buf, sizeof (buf), _("Help"), MENU_GENERIC, OP_HELP); - str_cat (helpstr, sizeof (helpstr), buf); + m_strcat(helpstr, sizeof(helpstr), buf); menu->help = helpstr; done = 0;