Home GnuPG

tests/basic: enable IV checks for CBC/CFB/CTR bulk tests

Description

tests/basic: enable IV checks for CBC/CFB/CTR bulk tests

* cipher/cipher.c (_gcry_cipher_ctl): Add handling for
'PRIV_CIPHERCTL_GET_COUNTER'.
* src/gcrypt-testapi.h (PRIV_CIPHERCTL_GET_COUNTER): New.
* tests/basic.c (cipher_cbc_bulk_test, cipher_cfb_bulk_test): Restore
IV checks by reading current IV from CBC/CFB cipher handle using
PRIV_CIPHERCTL_GET_INPUT_VECTOR.
(cipher_ctr_bulk_test): Restore counter checks by reading current
counter from CTR cipher handle using PRIV_CIPHERCTL_GET_COUNTER.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jun 26 2022, 4:54 PM
Parents
rC8d5053fb08cf: cipher,chacha20: Conditionalize a variable.
Branches
Unknown
Tags
Unknown