From e051e396156211449568afa0ca7505dc13eaa3b4 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 7 Jun 2017 16:09:07 +0200 Subject: common: Add cipher mode to compliance predicate. * common/compliance.c (gnupg_cipher_is_compliant): Add mode parameter. * common/compliance.h (gnupg_cipher_is_compliant): Likewise. * g10/mainproc.c (proc_encrypted): Adapt callsite. * sm/decrypt.c (gpgsm_decrypt): Likewise. GnuPG-bug-id: 3059 Signed-off-by: Justus Winter --- sm/decrypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sm/decrypt.c') diff --git a/sm/decrypt.c b/sm/decrypt.c index aa621ddf3..a36f69027 100644 --- a/sm/decrypt.c +++ b/sm/decrypt.c @@ -359,8 +359,7 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp) } /* For CMS, CO_DE_VS demands CBC mode. */ - is_de_vs = (mode == GCRY_CIPHER_MODE_CBC - && gnupg_cipher_is_compliant (CO_DE_VS, algo)); + is_de_vs = gnupg_cipher_is_compliant (CO_DE_VS, algo, mode); audit_log_i (ctrl->audit, AUDIT_DATA_CIPHER_ALGO, algo); dfparm.algo = algo; -- cgit v1.2.3