#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-mime/mime.h>
+
#include "mutt.h"
#include "enter.h"
#include "handler.h"
#include "mutt_curses.h"
#include "pgp.h"
-#include "mime.h"
#include "copy.h"
#include "attach.h"
# include <sys/resource.h>
#endif
-#ifdef CRYPT_BACKEND_CLASSIC_PGP
-
#include "mutt_crypt.h"
#include "mutt_menu.h"
break;
if (armor_header) {
- char *p = str_skip_initws (buf);
+ char *p = vskipspaces(buf);
if (*p == '\0')
armor_header = 0;
/* This routine attempts to find the keyids of the recipients of a message.
* It returns NULL if any of the keys can not be found.
*/
-char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc)
+char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc)
{
char *keyID, *keylist = NULL, *t;
size_t keylist_size = 0;
size_t keylist_used = 0;
- ADDRESS *tmp = NULL, *addr = NULL;
- ADDRESS **last = &tmp;
- ADDRESS *p, *q;
+ address_t *tmp = NULL, *addr = NULL;
+ address_t **last = &tmp;
+ address_t *p, *q;
int i;
pgp_key_t k_info = NULL, key = NULL;
abort ();
}
- *last = rfc822_cpy_adr (p);
+ *last = address_list_dup (p);
while (*last)
last = &((*last)->next);
}
}
else if (r == -1) {
p_delete(&keylist);
- rfc822_free_address (&tmp);
- rfc822_free_address (&addr);
+ address_delete (&tmp);
+ address_delete (&addr);
return NULL;
}
}
if ((key = pgp_ask_for_key (buf, q->mailbox,
KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) {
p_delete(&keylist);
- rfc822_free_address (&tmp);
- rfc822_free_address (&addr);
+ address_delete (&tmp);
+ address_delete (&addr);
return NULL;
}
}
keylist_used = m_strlen(keylist);
pgp_free_key (&key);
- rfc822_free_address (&addr);
+ address_delete (&addr);
}
- rfc822_free_address (&tmp);
+ address_delete (&tmp);
return (keylist);
}
char prompt[LONG_STRING];
- if (!(WithCrypto & APPLICATION_PGP))
- return msg->security;
-
/* If autoinline and no crypto options set, then set inline. */
if (option (OPTPGPAUTOINLINE) && !((msg->security & APPLICATION_PGP)
&& (msg->security & (SIGN | ENCRYPT))))
pgp_ask_for_key (_("Sign as: "), NULL, KEYFLAG_CANSIGN,
PGP_PUBRING))) {
snprintf (input_signas, sizeof (input_signas), "0x%s", pgp_keyid (p));
- str_replace (&PgpSignAs, input_signas);
+ m_strreplace(&PgpSignAs, input_signas);
pgp_free_key (&p);
msg->security |= SIGN;
return (msg->security);
}
-
-
-#endif /* CRYPT_BACKEND_CLASSIC_PGP */