OP_SIDEBAR_PREV "go to previous mailbox"
OP_SIDEBAR_PREV_NEW "go to previous mailbox with new mail"
OP_SIDEBAR_OPEN "open hilighted mailbox"
-OP_COMPOSE_ATTACH_KEY "attach a PGP public key"
OP_COMPOSE_PGP_MENU "show PGP options"
OP_MAIL_KEY "mail a PGP public key"
OP_VERIFY_KEY "verify a PGP public key"
/* see if crytpo is needed for this message. if so, we should exit curses */
if (cur->security) {
if (cur->security & ENCRYPT) {
- if (cur->security & APPLICATION_SMIME)
- crypt_smime_getkeys (cur->env);
cmflags |= M_CM_VERIFY;
}
else if (cur->security & SIGN) {
}
if (cmflags & M_CM_VERIFY || cur->security & ENCRYPT) {
- if (cur->security & APPLICATION_PGP) {
- if (cur->env->from)
- crypt_pgp_invoke_getkeys (cur->env->from);
-
- crypt_invoke_message (APPLICATION_PGP);
- }
-
- if (cur->security & APPLICATION_SMIME)
- crypt_invoke_message (APPLICATION_SMIME);
+ crypt_invoke_message(cur->security);
}
res = _mutt_copy_message (fpout, msg->fp, cur, cur->content, cmflags,
mutt_message_hook (NULL, msg, M_SEND2HOOK);
break;
- case OP_COMPOSE_ATTACH_KEY:
- if (idxlen == idxmax) {
- p_realloc(&idx, idxmax += 5);
- menu->data = idx;
- }
-
- idx[idxlen] = p_new(ATTACHPTR, 1);
- if ((idx[idxlen]->content =
- crypt_pgp_make_key_attachment (NULL)) != NULL) {
- update_idx (menu, idx, idxlen++);
- menu->redraw |= REDRAW_INDEX;
- }
- else
- p_delete(&idx[idxlen]);
-
- menu->redraw |= REDRAW_STATUS;
-
- if (option (OPTNEEDREDRAW)) {
- menu->redraw = REDRAW_FULL;
- unset_option (OPTNEEDREDRAW);
- }
-
- mutt_message_hook (NULL, msg, M_SEND2HOOK);
- break;
-
case OP_COMPOSE_ATTACH_FILE:
{
char *prompt, **files;
}
if (flags & CH_UPDATE_LEN && (flags & CH_NOLEN) == 0) {
- fprintf (out, "Content-Length: %lld\n", h->content->length);
+ fprintf (out, "Content-Length: %zu\n", h->content->length);
if (h->lines != 0 || h->content->length == 0)
fprintf (out, "Lines: %d\n", h->lines);
}
if (mutt_copy_header (fpin, hdr, fpout,
chflags | CH_NOLEN | CH_NONEWLINE, NULL))
return -1;
- fprintf (fpout, "Content-Length: %lld\n", new_length);
+ fprintf (fpout, "Content-Length: %zu\n", new_length);
if (new_lines <= 0)
new_lines = 0;
else
if (part->deleted) {
fprintf (fpout,
"Content-Type: message/external-body; access-type=x-mutt-deleted;\n"
- "\texpiration=%s; length=%lld\n"
+ "\texpiration=%s; length=%zu\n"
"\n", date + 5, part->length);
if (ferror (fpout))
return -1;
unset_option (OPTDONTHANDLEPGPKEYS);
}
-
-/* TODO */
-
-/* fixme: needs documentation. */
-void crypt_pgp_invoke_getkeys (address_t * addr)
-{
-}
-
-/* Generate a PGP public key attachment. */
-BODY *crypt_pgp_make_key_attachment (char *tempf)
-{
- return NULL;
-}
-
-/* S/MIME */
-
-/* fixme: Needs documentation. */
-void crypt_smime_getkeys (ENVELOPE * env)
-{
-}
-
-/***************************************************************************/
-
void crypt_invoke_message (int type)
{
if (type & APPLICATION_PGP) {
/* MIME handler for an PGP/MIME encrypted message. */
int crypt_pgp_encrypted_handler (BODY * a, STATE * s);
-/* fixme: needs documentation. */
-void crypt_pgp_invoke_getkeys (address_t * addr);
-
/* Check for a traditional PGP message in body B. */
int crypt_pgp_check_traditional (FILE * fp, BODY * b, int tagged_only);
/* MIME handler for the application/smime content-type. */
int crypt_smime_application_smime_handler (BODY * m, STATE * s);
-/* fixme: Needs documentation. */
-void crypt_smime_getkeys (ENVELOPE * env);
-
/* Check that the sender matches. */
int crypt_smime_verify_sender (HEADER * h);
ITEM("view-attach", OP_VIEW_ATTACH, M_ENTER_S)
ITEM("send-message", OP_COMPOSE_SEND_MESSAGE, "y")
ITEM("pipe-entry", OP_PIPE, "|")
-
- ITEM("attach-key", OP_COMPOSE_ATTACH_KEY, "\033k")
ITEM("pgp-menu", OP_COMPOSE_PGP_MENU, "p")
-
ITEM("smime-menu", OP_COMPOSE_SMIME_MENU, "S")
-
#ifdef MIXMASTER
ITEM("mix", OP_COMPOSE_MIX, "M")
#endif
menu->redraw = REDRAW_FULL;
break;
- case OP_MAIL_KEY:
- CHECK_ATTACH;
- ci_send_message (SENDKEY, NULL, NULL, NULL, NULL);
- menu->redraw = REDRAW_FULL;
- break;
-
-
case OP_EXTRACT_KEYS:
CHECK_MSGCOUNT;
CHECK_VISIBLE;
#define SENDFORWARD (1<<3)
#define SENDPOSTPONED (1<<4)
#define SENDBATCH (1<<5)
-#define SENDKEY (1<<6)
-#define SENDRESEND (1<<7)
-#define SENDNEWS (1<<8)
+#define SENDRESEND (1<<6)
+#define SENDNEWS (1<<7)
/* flags to _mutt_select_file() */
#define M_SEL_BUFFY (1<<0)
redraw = REDRAW_FULL;
break;
-
- case OP_MAIL_KEY:
- CHECK_MODE (IsHeader (extra));
- CHECK_ATTACH;
- ci_send_message (SENDKEY, NULL, NULL, extra->ctx, extra->hdr);
- redraw = REDRAW_FULL;
- break;
-
case OP_EXTRACT_KEYS:
CHECK_MODE (IsHeader (extra));
crypt_extract_keys_from_messages (extra->hdr);
&& crypt_pgp_decrypt_mime (fp, &bfp, newhdr->content, &b) == -1)
|| ((ccap & APPLICATION_SMIME)
&& crypt_smime_decrypt_mime (fp, &bfp, newhdr->content, &b) == -1)
- || b == NULL) {
- err:
+ || b == NULL)
+ {
mx_close_message (&msg);
envelope_delete(&newhdr->env);
body_list_wipe(&newhdr->content);
need_secured = 1;
if (hdr->security & APPLICATION_SMIME) {
- if (hdr->env)
- crypt_smime_getkeys (hdr->env);
-
if (mutt_is_application_smime (hdr->content)) {
secured = !crypt_smime_decrypt_mime (msg->fp, &fp,
hdr->content, &cur);
else if (i == -1)
return -1;
}
- else if (flags & SENDKEY) {
- BODY *btmp;
-
- if ((btmp = crypt_pgp_make_key_attachment (NULL)) == NULL)
- return -1;
-
- btmp->next = msg->content;
- msg->content = btmp;
- }
mutt_clear_error ();
address_list_wipe(&msg->env->from);
}
- if (!(flags & (SENDKEY | SENDPOSTPONED | SENDRESEND))) {
+ if (!(flags & (SENDPOSTPONED | SENDRESEND))) {
pbody = body_new();
pbody->next = msg->content; /* don't kill command-line attachments */
msg->content = pbody;
&& generate_body (tempfp, msg, flags, ctx, cur) == -1)
goto cleanup;
- if (!(flags & SENDKEY))
- append_signature (tempfp);
+ append_signature (tempfp);
/*
* this wants to be done _after_ generate_body, so message-hooks
&& !(flags & (SENDRESEND | SENDPOSTPONED)))
msg->env->from->personal = m_strdup(Realname);
- if (!(flags & SENDKEY))
- m_fclose(&tempfp);
+ m_fclose(&tempfp);
if (!(flags & SENDBATCH)) {
struct stat st;
* setting of $forward_edit because the user probably needs to add the
* recipients.
*/
- if (!(flags & SENDKEY) &&
- ((flags & SENDFORWARD) == 0 ||
+ if (((flags & SENDFORWARD) == 0 ||
(option (OPTEDITHDRS) && option (OPTAUTOEDIT)) ||
query_quadoption (OPT_FORWEDIT,
- _("Edit forwarded message?")) == M_YES)) {
+ _("Edit forwarded message?")) == M_YES))
+ {
/* If the this isn't a text message, look for a mailcap edit command */
if (rfc1524_mailcap_isneeded(msg->content)) {
if (!mutt_edit_attachment (msg->content))
mutt_message_hook (NULL, msg, M_SEND2HOOK);
}
- if (!(flags & (SENDPOSTPONED | SENDFORWARD | SENDKEY | SENDRESEND))) {
+ if (!(flags & (SENDPOSTPONED | SENDFORWARD | SENDRESEND))) {
if (stat (msg->content->filename, &st) == 0) {
/* if the file was not modified, bail out now */
if (mtime == st.st_mtime && !msg->content->next &&