aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-06-08 11:55:47 +0000
committerJustus Winter <[email protected]>2017-06-08 11:57:53 +0000
commitb03fab09e188f7bb10237d4f20455e4026737e4e (patch)
treebd1cc3281765bd3d7159b78d6b2fce3eff78534c
parentdirmngr: Implement HTTP connect timeouts of 15 or 2 seconds. (diff)
downloadgnupg-b03fab09e188f7bb10237d4f20455e4026737e4e.tar.gz
gnupg-b03fab09e188f7bb10237d4f20455e4026737e4e.zip
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/mainproc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 26cd0a9cc..2db8de1d5 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -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. */