1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Werner Koch 882ab7fef9
gpg: Improve decryption diagnostic for an ADSK key.
* g10/keydb.h (GET_PUBKEYBLOCK_FLAG_ADSK): New constant.
* g10/packet.h (PUBKEY_USAGE_XENC_MASK): New constant.
* g10/pubkey-enc.c (get_session_key): Consider an ADSK also as "marked
for encryption use".
(get_it): Print a note if an ADSK key was used.  Use the new
get_pubkeyblock flag.
* g10/getkey.c (struct getkey_ctx_s): Add field allow_adsk.
(get_pubkeyblock): Factor all code out to ...
(get_pubkeyblock_ext): new.
(finish_lookup): Add new arg allow_adsk and make use of it.
--

This patch solves two purposes:
- We write a note that the ADSK key was used for decryption
- We avoid running into a
  "oops: public key not found for preference check\n"
  due to ADSK keys.  The error is mostly harmless but lets gpg return
  with an exit code of 2.
2024-08-12 14:50:08 +02:00
..
2024-05-31 12:28:32 +02:00
2014-12-14 12:15:21 +01:00
sm/
2006-11-14 10:23:21 +00:00
2016-09-20 09:32:25 +09:00
DCO
2013-04-17 11:26:27 +02:00
2023-10-05 14:00:46 +09:00
2024-05-31 12:28:32 +02:00
2003-01-09 13:24:01 +00:00
2016-09-20 09:56:22 +09:00
2007-07-04 19:49:40 +00:00
2007-03-08 18:31:56 +00:00
2014-07-03 11:03:22 +02:00
2024-05-31 12:28:32 +02:00
2024-05-31 12:28:32 +02:00
2024-07-23 15:09:39 +02:00
2024-05-31 12:28:32 +02:00
2023-12-01 15:23:49 +09:00
2024-05-31 12:28:32 +02:00
2007-05-08 13:59:41 +00:00
2024-04-11 08:27:53 +02:00
2006-08-21 20:20:23 +00:00
2024-07-05 12:09:23 +02:00
2020-02-18 18:07:46 -05:00
2012-11-30 12:47:49 -05:00
2023-10-05 14:00:46 +09:00
2011-08-12 14:40:47 +02:00
2024-06-28 17:59:55 +02:00
2017-02-21 13:11:46 -05:00
2006-12-06 16:38:34 +00:00
2020-02-18 18:07:46 -05:00
2024-03-12 16:00:55 +01:00