mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Report STATUS_NO_SECKEY when it is examined.
* g10/packet.h (struct pubkey_enc_list): Add result. * g10/mainproc.c (proc_pubkey_enc): Initialize ->result. (proc_encrypted): Report STATUS_NO_SECKEY status. * g10/pubkey-enc.c (get_session_key): Set ->result. -- This change is for GPGME compatibility. Before this change, gpgme/tests/json/t-json failed with t-decrypt-verify. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
6c000d4b78
commit
dafffa95b2
3 changed files with 17 additions and 13 deletions
|
@ -132,6 +132,8 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek)
|
|||
if (openpgp_pk_test_algo2 (k->pubkey_algo, PUBKEY_USAGE_ENC))
|
||||
continue;
|
||||
|
||||
k->result = GPG_ERR_NO_SECKEY;
|
||||
|
||||
if (sk->pubkey_algo != k->pubkey_algo)
|
||||
continue;
|
||||
|
||||
|
@ -155,6 +157,7 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek)
|
|||
rc = get_it (ctrl, k, dek, sk, keyid);
|
||||
if (!rc)
|
||||
{
|
||||
k->result = 0;
|
||||
if (!opt.quiet && !k->keyid[0] && !k->keyid[1])
|
||||
log_info (_("okay, we are the anonymous recipient.\n"));
|
||||
search_for_secret_keys = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue