summaryrefslogtreecommitdiff
path: root/cipher
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-02-19 12:57:00 +0100
committerWerner Koch <wk@gnupg.org>2016-02-19 14:35:35 +0100
commit744b030cff61fd25114b0b25394c62782c153343 (patch)
tree3e963f15b0a4492782cfb4b3268032c97b9d67f2 /cipher
parent95f1db3affb9f5b8a2c814c211d4a02b30446c15 (diff)
downloadlibgcrypt-744b030cff61fd25114b0b25394c62782c153343.tar.gz
Add new private header gcrypt-testapi.h.
* src/gcrypt-testapi.h: New. * src/Makefile.am (libgcrypt_la_SOURCES): Add new file. * random/random.h: Include gcrypt-testapi.h. (struct gcry_drbg_test_vector) : Move to gcrypt-testapi.h. * src/global.c: Include gcrypt-testapi.h. (_gcry_vcontrol): Use PRIV_CTL_* constants instead of 58, 59, 60, 61. * cipher/cipher.c: Include gcrypt-testapi.h. (_gcry_cipher_ctl): Use PRIV_CIPHERCTL_ constants instead of 61, 62. * tests/fipsdrv.c: Include gcrypt-testapi.h. Remove definition of PRIV_CTL_ constants and replace their use by the new PRIV_CIPHERCTL_ constants. * tests/t-lock.c: Include gcrypt-testapi.h. Remove PRIV_CTL_EXTERNAL_LOCK_TEST and EXTERNAL_LOCK_TEST_ constants. * random/random-drbg.c (gcry_rngdrbg_cavs_test): Rename to ... (_gcry_rngdrbg_cavs_test): this. (gcry_rngdrbg_healthcheck_one): Rename to ... (_gcry_rngdrbg_healthcheck_one): this. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher')
-rw-r--r--cipher/cipher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c
index f163bde2..802ffad8 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include "g10lib.h"
+#include "../src/gcrypt-testapi.h"
#include "cipher.h"
#include "./cipher-internal.h"
@@ -1321,7 +1322,7 @@ _gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
disable_cipher_algo( *(int*)buffer );
break;
- case 61: /* Disable weak key detection (private). */
+ case PRIV_CIPHERCTL_DISABLE_WEAK_KEY: /* (private) */
if (h->spec->set_extra_info)
rc = h->spec->set_extra_info
(&h->context.c, CIPHER_INFO_NO_WEAK_KEY, NULL, 0);
@@ -1329,7 +1330,7 @@ _gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
rc = GPG_ERR_NOT_SUPPORTED;
break;
- case 62: /* Return current input vector (private). */
+ case PRIV_CIPHERCTL_GET_INPUT_VECTOR: /* (private) */
/* This is the input block as used in CFB and OFB mode which has
initially been set as IV. The returned format is:
1 byte Actual length of the block in bytes.