From fea5971488e049f902d7912df22a945bc755ad6d Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 23 Mar 2016 15:24:40 +0100 Subject: Add new control GCRYCTL_GET_TAGLEN for use with gcry_cipher_info. * src/gcrypt.h.in (GCRYCTL_GET_TAGLEN): New. * cipher/cipher.c (_gcry_cipher_info): Add GCRYCTL_GET_TAGLEN feature. * tests/basic.c (_check_gcm_cipher): Check that new feature. (_check_poly1305_cipher): Ditto. (check_ccm_cipher): Ditto. (do_check_ocb_cipher): Ditto. (check_ctr_cipher): Add negative test for new feature. -- Signed-off-by: Werner Koch --- src/gcrypt.h.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gcrypt.h.in') diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 797da2e2..c2696212 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -332,7 +332,8 @@ enum gcry_ctl_cmds GCRYCTL_REACTIVATE_FIPS_FLAG = 72, GCRYCTL_SET_SBOX = 73, GCRYCTL_DRBG_REINIT = 74, - GCRYCTL_SET_TAGLEN = 75 + GCRYCTL_SET_TAGLEN = 75, + GCRYCTL_GET_TAGLEN = 76 }; /* Perform various operations defined by CMD. */ @@ -986,7 +987,7 @@ enum gcry_cipher_flags gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *handle, int algo, int mode, unsigned int flags); -/* Close the cioher handle H and release all resource. */ +/* Close the cipher handle H and release all resource. */ void gcry_cipher_close (gcry_cipher_hd_t h); /* Perform various operations on the cipher object H. */ -- cgit v1.2.1