mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpg: Allow to create revocations even with non-compliant algos.
* g10/sign.c (do_sign): Skip compliance check for revocation certs. -- It just does not make sense to inhibit the creation of revocations depending on the compliance mode. We do this only for key revocation but not for another kind of revocation because the rationale for uid or subkey revocation is more complicated to explain.
This commit is contained in:
parent
275ced5067
commit
b7f45ee6ad
@ -444,8 +444,9 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
|
||||
goto leave;
|
||||
}
|
||||
|
||||
/* Check compliance. */
|
||||
if (! gnupg_digest_is_allowed (opt.compliance, 1, mdalgo))
|
||||
/* Check compliance but always allow for key revocations. */
|
||||
if (!IS_KEY_REV (sig)
|
||||
&& ! gnupg_digest_is_allowed (opt.compliance, 1, mdalgo))
|
||||
{
|
||||
log_error (_("digest algorithm '%s' may not be used in %s mode\n"),
|
||||
gcry_md_algo_name (mdalgo),
|
||||
@ -454,7 +455,8 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
|
||||
goto leave;
|
||||
}
|
||||
|
||||
if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_SIGNING,
|
||||
if (!IS_KEY_REV (sig)
|
||||
&& ! gnupg_pk_is_allowed (opt.compliance, PK_USE_SIGNING,
|
||||
pksk->pubkey_algo, 0,
|
||||
pksk->pkey, nbits_from_pk (pksk), NULL))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user