aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keydb.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-02-11 13:44:23 +0000
committerWerner Koch <[email protected]>2025-02-11 13:46:19 +0000
commit70049e5f16b412bcaaf97e6ea05613593c0c4247 (patch)
treedee5a422dc05e630c8042a9d7cc4bd4bdb1c0ff3 /g10/keydb.h
parentUpdate NEWS (diff)
downloadgnupg-70049e5f16b412bcaaf97e6ea05613593c0c4247.tar.gz
gnupg-70049e5f16b412bcaaf97e6ea05613593c0c4247.zip
gpg: Lookup key for merging/inserting only beu primary key.
* g10/getkey.c (get_keyblock_byfpr_fast): Add arg primary_only and implement. * g10/import.c (import_one_real): Simplify filling the fpr buffer with zeroes. (import_one_real): Find key only by primary fingerprint. -- This should have been done early: When looking up the original keyblock we want to update, we need to lookup it up only using the primary key. This avoids to find a key which has the primary key also has a subkey. GnuPG-bug-id: 7527
Diffstat (limited to 'g10/keydb.h')
-rw-r--r--g10/keydb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/keydb.h b/g10/keydb.h
index 2cdc8f2e5..36ade7930 100644
--- a/g10/keydb.h
+++ b/g10/keydb.h
@@ -422,6 +422,7 @@ gpg_error_t get_pubkey_byfpr_fast (ctrl_t ctrl, PKT_public_key *pk,
gpg_error_t get_keyblock_byfpr_fast (ctrl_t ctrl,
kbnode_t *r_keyblock,
KEYDB_HANDLE *r_hd,
+ int primary_only,
const byte *fpr, size_t fprlen,
int lock);