mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Fix adding the list of ultimate trusted keys.
* g10/keygen.c (do_generate_keypair): Remove call to
register_trusted_keyid for updating user_utk_list.
* g10/trust.c (register_trusted_keyid): Remove.
(update_ownertrust): Add call to tdb_update_utk.
* g10/trustdb.c (tdb_register_trusted_keyid): Make it internal
function by adding "static" qualifier.
Replace calls of register_trusted_keyid to tdb_register_trusted_keyid.
(tdb_update_utk): New.
* g10/trustdb.h (tdb_update_utk): New.
--
Backport of master commit of:
4aeeaa65ad
GnuPG-bug-id: 5742
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f16c535eee
commit
4cc724639c
4 changed files with 51 additions and 18 deletions
15
g10/trust.c
15
g10/trust.c
|
@ -49,17 +49,6 @@ cache_disabled_value (ctrl_t ctrl, PKT_public_key *pk)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_trusted_keyid (u32 *keyid)
|
||||
{
|
||||
#ifdef NO_TRUST_MODELS
|
||||
(void)keyid;
|
||||
#else
|
||||
tdb_register_trusted_keyid (keyid);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_trusted_key (const char *string)
|
||||
{
|
||||
|
@ -278,7 +267,11 @@ update_ownertrust (ctrl_t ctrl, PKT_public_key *pk, unsigned int new_trust)
|
|||
(void)pk;
|
||||
(void)new_trust;
|
||||
#else
|
||||
u32 keyid[2];
|
||||
|
||||
tdb_update_ownertrust (ctrl, pk, new_trust, 0);
|
||||
keyid_from_pk (pk, keyid);
|
||||
tdb_update_utk (keyid, (new_trust & TRUST_ULTIMATE));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue