diff options
author | Werner Koch <wk@gnupg.org> | 2013-04-18 14:40:43 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-05-23 12:23:19 +0200 |
commit | b402de8b9c4a9f269faf03ca952b1eb68a1f33c8 (patch) | |
tree | 6041c73d0bceb2b740ec88479d551824c2a8c930 | |
parent | 2fd06e207dcea1d8a7f0e7e92f3359615a99421b (diff) | |
download | libgcrypt-b402de8b9c4a9f269faf03ca952b1eb68a1f33c8.tar.gz |
Avoid compiler warning due to the global symbol setkey.
* cipher/cipher-selftest.c (_gcry_selftest_helper_cbc_128)
(_gcry_selftest_helper_ctr_128): Rename setkey to setkey_func.
--
setkey is a POSIX.1 function defined in stdlib.
-rw-r--r-- | cipher/cipher-selftest.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cipher/cipher-selftest.c b/cipher/cipher-selftest.c index 50c77520..439f3aee 100644 --- a/cipher/cipher-selftest.c +++ b/cipher/cipher-selftest.c @@ -47,7 +47,8 @@ /* Run the self-tests for <block cipher>-CBC-128, tests bulk CBC decryption. Returns NULL on success. */ const char * -_gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, +_gcry_selftest_helper_cbc_128 (const char *cipher, + gcry_cipher_setkey_t setkey_func, gcry_cipher_encrypt_t encrypt_one, gcry_cipher_bulk_cbc_dec_t bulk_cbc_dec, const int nblocks, const int blocksize, @@ -81,7 +82,7 @@ _gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, ciphertext = plaintext2 + nblocks * blocksize; /* Initialize ctx */ - setkey (ctx, key, sizeof(key)); + setkey_func (ctx, key, sizeof(key)); /* Test single block code path */ memset (iv, 0x4e, blocksize); @@ -162,7 +163,8 @@ _gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, /* Run the self-tests for <block cipher>-CTR-128, tests IV increment of bulk CTR encryption. Returns NULL on success. */ const char * -_gcry_selftest_helper_ctr_128 (const char *cipher, gcry_cipher_setkey_t setkey, +_gcry_selftest_helper_ctr_128 (const char *cipher, + gcry_cipher_setkey_t setkey_func, gcry_cipher_encrypt_t encrypt_one, gcry_cipher_bulk_ctr_enc_t bulk_ctr_enc, const int nblocks, const int blocksize, @@ -196,7 +198,7 @@ _gcry_selftest_helper_ctr_128 (const char *cipher, gcry_cipher_setkey_t setkey, ciphertext = plaintext2 + nblocks * blocksize; /* Initialize ctx */ - setkey (ctx, key, sizeof(key)); + setkey_func (ctx, key, sizeof(key)); /* Test single block code path */ memset (iv, 0xff, blocksize); |