From 5ee92a5ec1c743b5d3b5d2c7558d0f39e302b7e7 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sun, 2 Nov 2008 13:15:06 +0000 Subject: [PATCH] Fix asserts. Fix incorrect dependency. --- crypto/aes/Makefile | 2 -- crypto/aes/aes_ctr.c | 15 +++++++-------- crypto/camellia/Makefile | 3 --- crypto/camellia/cmll_ctr.c | 5 +++-- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/crypto/aes/Makefile b/crypto/aes/Makefile index 8b878ad818..7a55dd6ca5 100644 --- a/crypto/aes/Makefile +++ b/crypto/aes/Makefile @@ -45,8 +45,6 @@ lib: $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib -$(LIBOBJ): $(LIBSRC) - aes-ia64.s: asm/aes-ia64.S $(CC) $(CFLAGS) -E asm/aes-ia64.S > $@ diff --git a/crypto/aes/aes_ctr.c b/crypto/aes/aes_ctr.c index 501900a2ef..9b793a9e23 100644 --- a/crypto/aes/aes_ctr.c +++ b/crypto/aes/aes_ctr.c @@ -54,9 +54,9 @@ # define NDEBUG # endif #endif -#include #include +#include #include "aes_locl.h" /* NOTE: the IV/counter CTR mode is big-endian. The rest of the AES code @@ -113,15 +113,14 @@ static void AES_ctr128_inc(unsigned char *counter) { * into the rest of the IV when incremented. */ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, - size_t length, const AES_KEY *key, - unsigned char ivec[AES_BLOCK_SIZE], - unsigned char ecount_buf[AES_BLOCK_SIZE], - unsigned int *num) { - + size_t length, const AES_KEY *key, + unsigned char ivec[AES_BLOCK_SIZE], + unsigned char ecount_buf[AES_BLOCK_SIZE], + unsigned int *num) { unsigned int n; - assert(in && out && key && counter && num); - assert(*num < AES_BLOCK_SIZE); + OPENSSL_assert(in && out && key && ecount_buf && num); + OPENSSL_assert(*num < AES_BLOCK_SIZE); n = *num; diff --git a/crypto/camellia/Makefile b/crypto/camellia/Makefile index 6e9d762e90..223a807481 100644 --- a/crypto/camellia/Makefile +++ b/crypto/camellia/Makefile @@ -44,9 +44,6 @@ lib: $(LIBOBJ) $(RANLIB) $(LIB) || echo Never mind. @touch lib -$(LIBOBJ): $(LIBSRC) - - files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/camellia/cmll_ctr.c b/crypto/camellia/cmll_ctr.c index 332749ef76..a6cdc66957 100644 --- a/crypto/camellia/cmll_ctr.c +++ b/crypto/camellia/cmll_ctr.c @@ -57,6 +57,7 @@ #include #include +#include #include "cmll_locl.h" /* NOTE: the IV/counter CTR mode is big-endian. The rest of the Camellia code @@ -121,8 +122,8 @@ void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, unsigned int n; - assert(in && out && key && counter && num); - assert(*num < CAMELLIA_BLOCK_SIZE); + OPENSSL_assert(in && out && key && ecount_buf && num); + OPENSSL_assert(*num < CAMELLIA_BLOCK_SIZE); n = *num; -- 2.40.0