65 |
gpgme_decrypt_result_t res; |
gpgme_decrypt_result_t res; |
66 |
gpgme_sign_result_t res_sig; |
gpgme_sign_result_t res_sig; |
67 |
gpgme_key_t key; |
gpgme_key_t key; |
68 |
|
gpgme_recipient_t recip, r; |
69 |
void *ctx = NULL, *item; |
void *ctx = NULL, *item; |
70 |
const char *id; |
const char *id; |
71 |
char *info; |
char *info; |
84 |
} |
} |
85 |
else if (c->gpg_cmd == GPG_CMD_SIGN) |
else if (c->gpg_cmd == GPG_CMD_SIGN) |
86 |
CheckDlgButton (dlg, IDC_DECRYPT_SIGN_HIDE, BST_CHECKED); |
CheckDlgButton (dlg, IDC_DECRYPT_SIGN_HIDE, BST_CHECKED); |
87 |
res = gpgme_op_decrypt_result (c->gpg); |
if (c->recipients) |
88 |
if (res != NULL && c->gpg_cmd == GPG_CMD_DECRYPT) { |
recip = c->recipients; /* recipients were already extracted. */ |
89 |
gpgme_recipient_t r; |
else { |
|
|
|
90 |
/* XXX: not all ENCRYPT_TO entries are listed here. */ |
/* XXX: not all ENCRYPT_TO entries are listed here. */ |
91 |
|
res = gpgme_op_decrypt_result (c->gpg); |
92 |
|
if (res->recipients) |
93 |
|
recip = res->recipients; |
94 |
|
} |
95 |
|
if (recip != NULL && c->gpg_cmd == GPG_CMD_DECRYPT) { |
96 |
for (r = res->recipients; r; r = r->next) { |
for (r = res->recipients; r; r = r->next) { |
97 |
get_pubkey (r->keyid, &key); |
get_pubkey (r->keyid, &key); |
98 |
if (key) { |
if (key) { |
424 |
void |
void |
425 |
release_gpg_passphrase_cb (passphrase_cb_s *ctx) |
release_gpg_passphrase_cb (passphrase_cb_s *ctx) |
426 |
{ |
{ |
427 |
|
gpgme_recipient_t r, n; |
428 |
|
|
429 |
if (!ctx) |
if (!ctx) |
430 |
return; |
return; |
431 |
sfree_if_alloc (ctx->pwd); |
sfree_if_alloc (ctx->pwd); |
432 |
free_if_alloc (ctx->title); |
free_if_alloc (ctx->title); |
433 |
|
r = ctx->recipients; |
434 |
|
while (r) { |
435 |
|
n = r->next; |
436 |
|
safe_free (r->keyid); |
437 |
|
safe_free (r); |
438 |
|
r = n; |
439 |
|
} |
440 |
} |
} |
441 |
|
|
442 |
|
|