39 |
#include "wptUTF8.h" |
#include "wptUTF8.h" |
40 |
#include "resource.h" |
#include "resource.h" |
41 |
|
|
42 |
bool secret_key_available (gpgme_recipient_t rset); |
bool is_seckey_available (gpgme_recipient_t rset); |
43 |
|
|
44 |
/* Return the primary user-ID of the key with the keyid @keyid. |
/* Return the primary user-ID of the key with the keyid @keyid. |
45 |
Caller must free string. */ |
Caller must free string. */ |
56 |
if (!uid) |
if (!uid) |
57 |
BUG (NULL); |
BUG (NULL); |
58 |
sprintf (uid, "\n \"%s\"", key.ext->uids->uid); |
sprintf (uid, "\n \"%s\"", key.ext->uids->uid); |
59 |
|
winpt_release_pubkey (&key); |
60 |
return uid; |
return uid; |
61 |
} |
} |
62 |
|
|
127 |
agent_del_cache (pwd.keyid); |
agent_del_cache (pwd.keyid); |
128 |
|
|
129 |
res = gpgme_op_decrypt_result (ctx); |
res = gpgme_op_decrypt_result (ctx); |
130 |
if (err && res->recipients && !secret_key_available (res->recipients)) { |
if (err && res->recipients && !is_seckey_available (res->recipients)) { |
131 |
gpgme_recipient_t r = res->recipients; |
gpgme_recipient_t r = res->recipients; |
132 |
char *u = get_key_userid (r->keyid+8); |
char *u = get_key_userid (r->keyid+8); |
133 |
log_box (_("Decryption"), MB_ERR, |
log_box (_("Decryption"), MB_ERR, |