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,
showing up as use of uninitialized data with valgrind.
{ struct gcm_key key; struct gcm_ctx gcm; type cipher; }
/* 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 { \
- (set_key)(&(ctx)->cipher, (key)); \
+ (set_key)(&(ctx)->cipher, (gcm_key)); \
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
(nettle_cipher_func *) (encrypt)); \