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-06-25 09:41:14 +02:00
2024-05-31 12:28:32 +02:00
2014-12-14 12:15:21 +01:00
2023-08-24 11:28:12 +02:00
2006-11-14 10:23:21 +00:00
2017-07-24 10:43:27 +02:00
2011-12-01 11:09:02 +01:00
2014-11-04 21:47:03 +01:00
2016-09-20 09:32:25 +09:00
2013-04-17 11:26:27 +02:00
2023-10-05 14:00:46 +09:00
2024-06-24 16:31:40 +02:00
2024-05-31 12:28:32 +02:00
2015-03-04 15:10:52 +01:00
2021-03-11 12:38:51 +01:00
2003-01-09 13:24:01 +00:00
2016-09-20 09:56:22 +09:00
2023-06-01 12:42:51 +02:00
2004-12-21 19:05:15 +00:00
2004-12-21 19:05:15 +00:00
2006-06-20 17:47:10 +00:00
2007-07-04 19:49:40 +00:00
2011-08-12 14:40:47 +02:00
2007-03-08 18:31:56 +00:00
2014-07-03 11:03:22 +02:00
2014-06-25 11:15:45 +02:00
2020-09-10 13:58:47 +02:00
2024-05-31 12:28:32 +02:00
2024-03-12 16:00:55 +01:00
2024-05-31 12:28:32 +02:00
2024-08-12 14:50:08 +02:00
2024-03-26 15:46:56 +01:00
2024-07-23 15:09:39 +02:00
2016-11-05 12:02:19 +01:00
2024-05-31 12:28:32 +02:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2020-12-23 11:25:03 +09:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2023-12-01 15:23:49 +09:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2024-05-31 12:28:32 +02:00
2020-12-23 11:38:50 +09:00
2020-12-28 17:16:11 +09:00
2023-10-05 14:00:46 +09:00
2007-05-08 13:59:41 +00:00
2016-09-20 16:15:19 +09: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
2016-07-06 19:35:15 +02:00
2012-11-30 12:43:34 -05:00
2020-02-18 18:07:46 -05:00
2014-10-17 13:32:16 +02:00
2023-12-22 12:47:39 +01:00
2012-11-30 12:47:49 -05:00
2024-08-01 12:14:01 +02:00
2006-08-18 13:05:39 +00:00
2023-10-05 14:00:46 +09:00
2016-09-20 16:15:19 +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
2018-05-07 08:07:07 +02:00
2017-02-21 13:11:46 -05:00
2010-07-23 16:16:14 +00: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
2022-09-16 14:33:50 +09:00