mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-17 14:07:03 +01:00
gpg: Fix computation of compliance with CO_DE_VS.
* g10/mainproc.c (proc_encrypted): Symmetric encryption is also in compliance with CO_DE_VS. GnuPG-bug-id: 3059 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
9b43220b8a
commit
b03fab09e1
@ -602,8 +602,8 @@ proc_encrypted (CTX c, PACKET *pkt)
|
||||
|
||||
/* Compute compliance with CO_DE_VS. */
|
||||
if (!result && is_status_enabled ()
|
||||
/* Symmetric encryption voids compliance. */
|
||||
&& c->symkeys == 0
|
||||
/* Symmetric encryption and asymmetric encryption voids compliance. */
|
||||
&& ((c->symkeys > 0) != (c->pkenc_list != NULL))
|
||||
/* Overriding session key voids compliance. */
|
||||
&& opt.override_session_key == NULL
|
||||
/* Check symmetric cipher. */
|
||||
@ -613,7 +613,8 @@ proc_encrypted (CTX c, PACKET *pkt)
|
||||
int compliant = 1;
|
||||
PKT_public_key *pk = xmalloc (sizeof *pk);
|
||||
|
||||
log_assert (c->pkenc_list || !"where else did the session key come from!?");
|
||||
log_assert (c->pkenc_list || c->symkeys
|
||||
|| !"where else did the session key come from!?");
|
||||
|
||||
/* Now check that every key used to encrypt the session key is
|
||||
* compliant. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user