mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
gpg: Correctly set the ownertrust for a new key.
* g10/keygen.c (do_generate_keypair): Use update_ownertrust. -- GnuPG-bug-id: 5742
This commit is contained in:
parent
69195ab255
commit
6105287252
@ -5608,7 +5608,6 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
|
|||||||
{
|
{
|
||||||
int no_enc_rsa;
|
int no_enc_rsa;
|
||||||
PKT_public_key *pk;
|
PKT_public_key *pk;
|
||||||
char hexfpr[2*MAX_FINGERPRINT_LEN + 1];
|
|
||||||
|
|
||||||
no_enc_rsa = ((get_parameter_algo (ctrl, para, pKEYTYPE, NULL)
|
no_enc_rsa = ((get_parameter_algo (ctrl, para, pKEYTYPE, NULL)
|
||||||
== PUBKEY_ALGO_RSA)
|
== PUBKEY_ALGO_RSA)
|
||||||
@ -5618,8 +5617,7 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
|
|||||||
|
|
||||||
pk = find_kbnode (pub_root, PKT_PUBLIC_KEY)->pkt->pkt.public_key;
|
pk = find_kbnode (pub_root, PKT_PUBLIC_KEY)->pkt->pkt.public_key;
|
||||||
|
|
||||||
hexfingerprint (pk, hexfpr, sizeof hexfpr);
|
update_ownertrust (ctrl, pk, TRUST_ULTIMATE);
|
||||||
register_trusted_key (hexfpr);
|
|
||||||
|
|
||||||
if (!opt.flags.no_auto_trust_new_key)
|
if (!opt.flags.no_auto_trust_new_key)
|
||||||
update_ownertrust (ctrl, pk,
|
update_ownertrust (ctrl, pk,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user