mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
g10: Make sure some functions are passed a primary key.
* g10/tofu.c (get_trust): Make sure the caller provides a primary key. (tofu_register_signature): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
ee19eacd1d
commit
13ddc17ddb
@ -2011,6 +2011,8 @@ get_trust (ctrl_t ctrl, PKT_public_key *pk,
|
|||||||
if (opt.batch)
|
if (opt.batch)
|
||||||
may_ask = 0;
|
may_ask = 0;
|
||||||
|
|
||||||
|
log_assert (keyid_cmp (pk_keyid (pk), pk->main_keyid) == 0);
|
||||||
|
|
||||||
/* Make sure _tofu_GET_TRUST_ERROR isn't equal to any of the trust
|
/* Make sure _tofu_GET_TRUST_ERROR isn't equal to any of the trust
|
||||||
levels. */
|
levels. */
|
||||||
log_assert (_tofu_GET_TRUST_ERROR != TRUST_UNKNOWN
|
log_assert (_tofu_GET_TRUST_ERROR != TRUST_UNKNOWN
|
||||||
@ -2778,6 +2780,8 @@ tofu_register_signature (ctrl_t ctrl,
|
|||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
log_assert (keyid_cmp (pk_keyid (pk), pk->main_keyid) == 0);
|
||||||
|
|
||||||
sig_digest = make_radix64_string (sig_digest_bin, sig_digest_bin_len);
|
sig_digest = make_radix64_string (sig_digest_bin, sig_digest_bin_len);
|
||||||
fingerprint = hexfingerprint (pk, NULL, 0);
|
fingerprint = hexfingerprint (pk, NULL, 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user