Commit fccdf01b authored by Niels Möller's avatar Niels Möller

GCM_SET_KEY: Rename macro argument to avoid collision with struct tag.

Spotted by Nikos Mavrogiannopoulos.
parent 68fc6af9
2014-11-24 Niels Möller <nisse@lysator.liu.se> 2014-11-24 Niels Möller <nisse@lysator.liu.se>
* gcm.h (GCM_SET_KEY): Rename macro argument KEY to avoid
collision with a struct tag. Spotted by Nikos Mavrogiannopoulos.
* testsuite/eddsa-verify-test.c (test_eddsa): Fixed test case bug, * testsuite/eddsa-verify-test.c (test_eddsa): Fixed test case bug,
showing up as use of uninitialized data with valgrind. showing up as use of uninitialized data with valgrind.
......
...@@ -151,9 +151,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key, ...@@ -151,9 +151,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key,
{ struct gcm_key key; struct gcm_ctx gcm; type cipher; } { struct gcm_key key; struct gcm_ctx gcm; type cipher; }
/* NOTE: Avoid using NULL, as we don't include anything defining it. */ /* NOTE: Avoid using NULL, as we don't include anything defining it. */
#define GCM_SET_KEY(ctx, set_key, encrypt, key) \ #define GCM_SET_KEY(ctx, set_key, encrypt, gcm_key) \
do { \ do { \
(set_key)(&(ctx)->cipher, (key)); \ (set_key)(&(ctx)->cipher, (gcm_key)); \
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \ if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \ gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
(nettle_cipher_func *) (encrypt)); \ (nettle_cipher_func *) (encrypt)); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment