#include "pager.h"
#include "recvattach.h"
#include "sort.h"
+#include "crypt-gpgme.h"
/*
* Helper macros.
}
-static crypt_key_t *crypt_getkeybystr (char *p, short abilities,
+static crypt_key_t *crypt_getkeybystr (const char *p, short abilities,
unsigned int app, int *forced_valid)
{
string_list_t *hints = NULL;
static char *find_keys (address_t * to, address_t * cc, address_t * bcc,
unsigned int app)
{
- char *keyID, *keylist = NULL, *t;
+ char *keylist = NULL, *t;
+ const char *keyID;
ssize_t keylist_size = 0;
ssize_t keylist_used = 0;
address_t *tmp = NULL, *addr = NULL;
q = addr;
}
else {
-#if 0
- k_info = crypt_getkeybystr (keyID, KEYFLAG_CANENCRYPT,
- *r_application, &forced_valid);
-#else
k_info = crypt_getkeybystr (keyID, KEYFLAG_CANENCRYPT,
app, &forced_valid);
-#endif
}
}
else if (r == -1) {
snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
if ((key = crypt_ask_for_key (buf, q->mailbox, KEYFLAG_CANENCRYPT,
-#if 0
- *r_application,
-#else
app,
-#endif
&forced_valid)) == NULL) {
p_delete(&keylist);
address_list_wipe(&tmp);
{
const char *s = crypt_fpr (key);
-#if 0
- if (key->flags & KEYFLAG_ISX509)
- *r_application &= ~APPLICATION_PGP;
- if (!(key->flags & KEYFLAG_ISX509))
- *r_application &= ~APPLICATION_SMIME;
-#endif
-
keylist_size += m_strlen(s) + 4 + 1;
p_realloc(&keylist, keylist_size);
sprintf (keylist + keylist_used, "%s0x%s%s", /* __SPRINTF_CHECKED__ */
msg->security |= (is_smime ? SMIMESIGN : PGPSIGN);
}
-#if 0
- else {
- msg->security &= (is_smime ? ~SMIMESIGN : ~PGPSIGN);
- }
-#endif
*redraw = REDRAW_FULL;
break;