compilation fix for nettle API change in 16.04
This commit is contained in:
@@ -48,7 +48,12 @@ void test_uncipher_ctr(const struct nettle_cipher *cipher, const uint8_t *key,
|
|||||||
uint8_t *data = malloc(length);
|
uint8_t *data = malloc(length);
|
||||||
uint8_t *ctr = malloc(cipher->block_size);
|
uint8_t *ctr = malloc(cipher->block_size);
|
||||||
|
|
||||||
|
#if NETTLE_VERSION <= 27
|
||||||
cipher->set_encrypt_key(ctx, key_length, key);
|
cipher->set_encrypt_key(ctx, key_length, key);
|
||||||
|
#else
|
||||||
|
cipher->set_encrypt_key(ctx, key);
|
||||||
|
#endif
|
||||||
|
|
||||||
memcpy(ctr, ictr, cipher->block_size);
|
memcpy(ctr, ictr, cipher->block_size);
|
||||||
|
|
||||||
ctr_crypt(ctx, cipher->encrypt,
|
ctr_crypt(ctx, cipher->encrypt,
|
||||||
|
|||||||
@@ -47,7 +47,12 @@ static void test_cipher_ctr(const struct nettle_cipher *cipher, const uint8_t *k
|
|||||||
uint8_t *data = malloc(length);
|
uint8_t *data = malloc(length);
|
||||||
uint8_t *ctr = malloc(cipher->block_size);
|
uint8_t *ctr = malloc(cipher->block_size);
|
||||||
|
|
||||||
|
#if NETTLE_VERSION <= 27
|
||||||
cipher->set_encrypt_key(ctx, key_length, key);
|
cipher->set_encrypt_key(ctx, key_length, key);
|
||||||
|
#else
|
||||||
|
cipher->set_encrypt_key(ctx, key);
|
||||||
|
#endif
|
||||||
|
|
||||||
memcpy(ctr, ictr, cipher->block_size);
|
memcpy(ctr, ictr, cipher->block_size);
|
||||||
|
|
||||||
ctr_crypt(ctx, cipher->encrypt,
|
ctr_crypt(ctx, cipher->encrypt,
|
||||||
|
|||||||
Reference in New Issue
Block a user