From 539705d58fc39a28388ff18c695dd406f4ffd1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Fri, 20 Mar 2015 12:32:29 +0000 Subject: MirOTR: Libgcrypt and Libgpg-error update Libgcrypt 1.4.6 => 1.6.3 Libgpg-error 1.9 => 1.18 git-svn-id: http://svn.miranda-ng.org/main/trunk@12449 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirOTR/Libgcrypt/cipher/crc.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'plugins/MirOTR/Libgcrypt/cipher/crc.c') diff --git a/plugins/MirOTR/Libgcrypt/cipher/crc.c b/plugins/MirOTR/Libgcrypt/cipher/crc.c index d04fff8941..1322f0da8c 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/crc.c +++ b/plugins/MirOTR/Libgcrypt/cipher/crc.c @@ -25,7 +25,6 @@ #include #include "g10lib.h" -#include "memory.h" #include "cipher.h" #include "bithelp.h" @@ -150,9 +149,12 @@ CRC_CONTEXT; /* CRC32 */ static void -crc32_init (void *context) +crc32_init (void *context, unsigned int flags) { CRC_CONTEXT *ctx = (CRC_CONTEXT *) context; + + (void)flags; + ctx->CRC = 0 ^ 0xffffffffL; } @@ -185,9 +187,12 @@ crc32_final (void *context) /* CRC32 a'la RFC 1510 */ static void -crc32rfc1510_init (void *context) +crc32rfc1510_init (void *context, unsigned int flags) { CRC_CONTEXT *ctx = (CRC_CONTEXT *) context; + + (void)flags; + ctx->CRC = 0; } @@ -238,9 +243,12 @@ crc32rfc1510_final (void *context) #define CRC24_POLY 0x1864cfbL static void -crc24rfc2440_init (void *context) +crc24rfc2440_init (void *context, unsigned int flags) { CRC_CONTEXT *ctx = (CRC_CONTEXT *) context; + + (void)flags; + ctx->CRC = CRC24_INIT; } @@ -273,8 +281,12 @@ crc24rfc2440_final (void *context) ctx->buf[2] = (ctx->CRC ) & 0xFF; } +/* We allow the CRC algorithms even in FIPS mode because they are + actually no cryptographic primitives. */ + gcry_md_spec_t _gcry_digest_spec_crc32 = { + GCRY_MD_CRC32, {0, 1}, "CRC32", NULL, 0, NULL, 4, crc32_init, crc32_write, crc32_final, crc32_read, sizeof (CRC_CONTEXT) @@ -282,6 +294,7 @@ gcry_md_spec_t _gcry_digest_spec_crc32 = gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 = { + GCRY_MD_CRC32_RFC1510, {0, 1}, "CRC32RFC1510", NULL, 0, NULL, 4, crc32rfc1510_init, crc32_write, crc32rfc1510_final, crc32_read, @@ -290,6 +303,7 @@ gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 = gcry_md_spec_t _gcry_digest_spec_crc24_rfc2440 = { + GCRY_MD_CRC24_RFC2440, {0, 1}, "CRC24RFC2440", NULL, 0, NULL, 3, crc24rfc2440_init, crc24rfc2440_write, crc24rfc2440_final, crc32_read, -- cgit v1.2.3