mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
g10: Still check if the key is an UTK or cross signed in batch mode.
* g10/tofu.c (get_trust): If POLICY is ask, but we can't ask, don't bail immediately. Instead, check if the key in question is an ultimately trusted key or cross signed. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
5bf92e51df
commit
e09166c772
31
g10/tofu.c
31
g10/tofu.c
@ -2131,12 +2131,6 @@ get_trust (ctrl_t ctrl, PKT_public_key *pk,
|
|||||||
|
|
||||||
case TOFU_POLICY_ASK:
|
case TOFU_POLICY_ASK:
|
||||||
/* We need to ask the user what to do. Case #1 or #2 below. */
|
/* We need to ask the user what to do. Case #1 or #2 below. */
|
||||||
if (! may_ask)
|
|
||||||
{
|
|
||||||
trust_level = TRUST_UNDEFINED;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOFU_POLICY_NONE:
|
case TOFU_POLICY_NONE:
|
||||||
@ -2296,18 +2290,19 @@ get_trust (ctrl_t ctrl, PKT_public_key *pk,
|
|||||||
|
|
||||||
if (! may_ask)
|
if (! may_ask)
|
||||||
{
|
{
|
||||||
/* We can only get here in the third case (no saved policy) and
|
log_assert (policy == TOFU_POLICY_NONE || policy == TOFU_POLICY_ASK);
|
||||||
* if there is a conflict. (If the policy was ask (cases #1 and
|
if (policy == TOFU_POLICY_NONE)
|
||||||
* #2) and we weren't allowed to ask, we'd have already exited). */
|
{
|
||||||
log_assert (policy == TOFU_POLICY_NONE);
|
/* We get here in the third case (no saved policy) and if
|
||||||
|
* there is a conflict. */
|
||||||
if (record_binding (dbs, fingerprint, email, user_id,
|
if (record_binding (dbs, fingerprint, email, user_id,
|
||||||
TOFU_POLICY_ASK,
|
TOFU_POLICY_ASK,
|
||||||
conflict_set && conflict_set->next
|
conflict_set && conflict_set->next
|
||||||
? conflict_set->next->d : NULL,
|
? conflict_set->next->d : NULL,
|
||||||
0, now) != 0)
|
0, now) != 0)
|
||||||
log_error (_("error setting TOFU binding's trust level to %s\n"),
|
log_error (_("error setting TOFU binding's trust level to %s\n"),
|
||||||
"ask");
|
"ask");
|
||||||
|
}
|
||||||
|
|
||||||
trust_level = TRUST_UNDEFINED;
|
trust_level = TRUST_UNDEFINED;
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user