diff options
author | Justus Winter <justus@g10code.com> | 2017-06-07 16:09:07 +0200 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-06-07 16:54:44 +0200 |
commit | e051e396156211449568afa0ca7505dc13eaa3b4 (patch) | |
tree | f576501d9ac2c1eddeab08b8dc7182f314b685b8 /sm/decrypt.c | |
parent | common,gpg,sm: Initialize compliance module. (diff) | |
download | gnupg2-e051e396156211449568afa0ca7505dc13eaa3b4.tar.xz gnupg2-e051e396156211449568afa0ca7505dc13eaa3b4.zip |
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 <justus@g10code.com>
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r-- | sm/decrypt.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; |