summaryrefslogtreecommitdiff
path: root/cipher/mac-poly1305.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2021-01-25 21:17:52 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2021-01-26 19:42:41 +0200
commit17aad639d29c7c835a7effb89181c7c99b16cb6a (patch)
tree642d948953a963b3243bc49fe7f99bfc29fd0532 /cipher/mac-poly1305.c
parent1e72c50f864ae1c77ba80c191224b9ef1d22a2e2 (diff)
downloadlibgcrypt-17aad639d29c7c835a7effb89181c7c99b16cb6a.tar.gz
cipher-proto: remove forward typedef of cipher_bulk_ops_t
* cipher/cipher-proto (cipher_bulk_ops_t): Remove typedef, leave forward declaration of 'struct cipher_bulk_ops'. (gcry_cipher_setkey_t): Change 'bulk_ops' to 'struct cipher_bulk_ops *'. * cipher/arcfour.c: Include 'cipher-internal.h'. * cipher/gost28147.c: Ditto. * cipher/idea.c: Ditto. * cipher/rfc2268.c: Ditto. * cipher/salsa20.c: Ditto. * cipher/seed.c: Ditto. * cipher/mac-internal.h (CTX_MAGIC_NORMAL): Rename to... (CTX_MAC_MAGIC_NORMAL): ... this. (CTX_MAGIC_SECURE): Rename to... (CTX_MAC_MAGIC_SECURE): ... this. * cipher/mac-cmac.c (cmac_open): Use CTX_MAC_MAGIC_SECURE. * cipher/mac-gmac.c (gmac_open): Ditto. * cipher/mac-hmac.c (hmac_open): Ditto. * cipher/mac-poly1305.c (poly1305mac_open): Ditto. * cipher/mac.c (mac_open): Use CTX_MAC_MAGIC_SECURE and CTX_MAC_MAGIC_NORMAL. -- CTX_MAC_MAGIC_* change is needed since gost28147.c now includes both 'cipher-internal.h' and 'mac-internal.h' which both defined CTX_MAC_MAGIC_* with different values. GnuPG-bug-id: 5264 Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/mac-poly1305.c')
-rw-r--r--cipher/mac-poly1305.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/mac-poly1305.c b/cipher/mac-poly1305.c
index d27a31c6..46ea735f 100644
--- a/cipher/mac-poly1305.c
+++ b/cipher/mac-poly1305.c
@@ -45,7 +45,7 @@ static gcry_err_code_t
poly1305mac_open (gcry_mac_hd_t h)
{
struct poly1305mac_context_s *mac_ctx;
- int secure = (h->magic == CTX_MAGIC_SECURE);
+ int secure = (h->magic == CTX_MAC_MAGIC_SECURE);
unsigned int flags = (secure ? GCRY_CIPHER_SECURE : 0);
gcry_err_code_t err;
int cipher_algo;