diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2022-06-26 17:54:30 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2022-07-06 13:04:08 +0300 |
commit | fd3ed68754eb1741cef22bce8bc2957f3853a292 (patch) | |
tree | ac8a9f88314447f2f9f676d2583f458e8da343d2 /src/gcrypt-testapi.h | |
parent | 8d5053fb08cf2a38360be2d2f5534b137c299e74 (diff) | |
download | libgcrypt-fd3ed68754eb1741cef22bce8bc2957f3853a292.tar.gz |
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>
Diffstat (limited to 'src/gcrypt-testapi.h')
-rw-r--r-- | src/gcrypt-testapi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gcrypt-testapi.h b/src/gcrypt-testapi.h index 0417754f..f5608084 100644 --- a/src/gcrypt-testapi.h +++ b/src/gcrypt-testapi.h @@ -41,6 +41,7 @@ /* For use with gcry_cipher_ctl: */ #define PRIV_CIPHERCTL_DISABLE_WEAK_KEY 61 #define PRIV_CIPHERCTL_GET_INPUT_VECTOR 62 +#define PRIV_CIPHERCTL_GET_COUNTER 63 /* Private interfaces for testing of random-drbg.c. */ |