diff options
author | Werner Koch <wk@gnupg.org> | 2016-02-19 12:57:00 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-02-19 14:35:35 +0100 |
commit | 744b030cff61fd25114b0b25394c62782c153343 (patch) | |
tree | 3e963f15b0a4492782cfb4b3268032c97b9d67f2 /src/global.c | |
parent | 95f1db3affb9f5b8a2c814c211d4a02b30446c15 (diff) | |
download | libgcrypt-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 'src/global.c')
-rw-r--r-- | src/global.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/global.c b/src/global.c index b4954bad..4bd928b9 100644 --- a/src/global.c +++ b/src/global.c @@ -35,6 +35,7 @@ #endif /*HAVE_SYSLOG*/ #include "g10lib.h" +#include "gcrypt-testapi.h" #include "cipher.h" #include "stdmem.h" /* our own memory allocator */ #include "secmem.h" /* our own secmem allocator */ @@ -575,25 +576,25 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wswitch" #endif - case 58: /* Init external random test. */ + case PRIV_CTL_INIT_EXTRNG_TEST: /* Init external random test. */ rc = GPG_ERR_NOT_SUPPORTED; break; - case 59: /* Run external DRBG test. */ + case PRIV_CTL_RUN_EXTRNG_TEST: /* Run external DRBG test. */ { struct gcry_drbg_test_vector *test = va_arg (arg_ptr, struct gcry_drbg_test_vector *); unsigned char *buf = va_arg (arg_ptr, unsigned char *); if (buf) - rc = gcry_rngdrbg_cavs_test (test, buf); + rc = _gcry_rngdrbg_cavs_test (test, buf); else - rc = gcry_rngdrbg_healthcheck_one (test); + rc = _gcry_rngdrbg_healthcheck_one (test); } break; - case 60: /* Deinit external random test. */ + case PRIV_CTL_DEINIT_EXTRNG_TEST: /* Deinit external random test. */ rc = GPG_ERR_NOT_SUPPORTED; break; - case 61: /* Run external lock test */ + case PRIV_CTL_EXTERNAL_LOCK_TEST: /* Run external lock test */ rc = external_lock_test (va_arg (arg_ptr, int)); break; case 62: /* RFU */ |