X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fsmime.c;h=bbaa198173099b8669dd4d0cce8eb2545de9086c;hb=27c3007f2cfb52db5a357eaa2a8313a5ab03c93d;hp=f5700a2ff983a687248eb61b596d32d2bb2bbb0e;hpb=9ed7a487e3a922f2cbb222961c2c9710c3a65f91;p=apps%2Fmadmutt.git diff --git a/lib-crypt/smime.c b/lib-crypt/smime.c index f5700a2..bbaa198 100644 --- a/lib-crypt/smime.c +++ b/lib-crypt/smime.c @@ -219,11 +219,9 @@ _mutt_fmt_smime_command (char *dest, ssize_t destlen, char op, } if (optional) - mutt_FormatString (dest, destlen, ifstring, _mutt_fmt_smime_command, - data, 0); + m_strformat(dest, destlen, ifstring, _mutt_fmt_smime_command, data, 0); else if (flags & M_FORMAT_OPTIONAL) - mutt_FormatString (dest, destlen, elsestring, _mutt_fmt_smime_command, - data, 0); + m_strformat(dest, destlen, elsestring, _mutt_fmt_smime_command, data, 0); return (src); } @@ -234,8 +232,8 @@ static void mutt_smime_command (char *d, ssize_t dlen, struct smime_command_context *cctx, const char *fmt) { - mutt_FormatString (d, dlen, NONULL (fmt), _mutt_fmt_smime_command, - (unsigned long) cctx, 0); + m_strformat(d, dlen, NONULL (fmt), _mutt_fmt_smime_command, + (unsigned long)cctx, 0); } static pid_t smime_invoke (FILE ** smimein, FILE ** smimeout, @@ -404,12 +402,12 @@ char *smime_ask_for_key (char *prompt, char *mailbox __attribute__((unused)), /* Make Helpstring */ helpstr[0] = 0; mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_SMIME, OP_EXIT); - strcat (helpstr, buf); /* __STRCAT_CHECKED__ */ + m_strcat(helpstr, sizeof(helpstr), buf); mutt_make_help (buf, sizeof (buf), _("Select "), MENU_SMIME, OP_GENERIC_SELECT_ENTRY); - strcat (helpstr, buf); /* __STRCAT_CHECKED__ */ + m_strcat(helpstr, sizeof(helpstr), buf); mutt_make_help (buf, sizeof (buf), _("Help"), MENU_SMIME, OP_HELP); - strcat (helpstr, buf); /* __STRCAT_CHECKED__ */ + m_strcat(helpstr, sizeof(helpstr), buf); /* Create the menu */ menu = mutt_new_menu (); @@ -708,8 +706,6 @@ char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc) address_t *p, *q; int i; - const char *fqdn = mutt_fqdn (1); - for (i = 0; i < 3; i++) { switch (i) { case 0: @@ -730,8 +726,7 @@ char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc) last = &((*last)->next); } - if (fqdn) - rfc822_qualify (tmp, fqdn); + rfc822_qualify(tmp, mutt_fqdn(1)); address_list_uniq(tmp); @@ -754,7 +749,7 @@ char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc) keylist_size += m_strlen(keyID) + 2; p_realloc(&keylist, keylist_size); - sprintf (keylist + keylist_used, "%s\n", keyID); /* __SPRINTF_CHECKED__ */ + sprintf (keylist + keylist_used, "%s\n", keyID); keylist_used = m_strlen(keylist); address_list_wipe(&addr); @@ -1087,7 +1082,7 @@ int smime_verify_sender (HEADER * h) fpout = m_tempfile (tempfname, sizeof(tempfname), NONULL(Tempdir), NULL); if (!fpout) { - mutt_perror (tempfname); + mutt_perror (_("Can't create temporary file")); return 1; } @@ -1187,7 +1182,7 @@ BODY *smime_build_smime_entity (BODY * a, char *certlist) fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); if (!fpout) { - mutt_perror (tempfile); + mutt_perror (_("Can't create temporary file")); return NULL; } @@ -1769,7 +1764,7 @@ int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur) tmpfp = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); if (!tmpfp) { - mutt_perror (tempfile); + mutt_perror (_("Can't create temporary file")); return (-1); } @@ -1785,7 +1780,7 @@ int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur) *fpout = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); if (!*fpout) { - mutt_perror (tempfile); + mutt_perror (_("Can't create temporary file")); rv = -1; goto bail; } @@ -1912,10 +1907,6 @@ int smime_send_menu (HEADER * msg, int *redraw) /* probably need a different passphrase */ crypt_smime_void_passphrase (); } -#if 0 - else - msg->security &= ~SIGN; -#endif *redraw = REDRAW_FULL; break;