Fix asserts. Fix incorrect dependency.
This commit is contained in:
parent
c76fd290be
commit
5ee92a5ec1
@ -45,8 +45,6 @@ lib: $(LIBOBJ)
|
|||||||
$(RANLIB) $(LIB) || echo Never mind.
|
$(RANLIB) $(LIB) || echo Never mind.
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
$(LIBOBJ): $(LIBSRC)
|
|
||||||
|
|
||||||
aes-ia64.s: asm/aes-ia64.S
|
aes-ia64.s: asm/aes-ia64.S
|
||||||
$(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
|
$(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@
|
|||||||
# define NDEBUG
|
# define NDEBUG
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
#include "aes_locl.h"
|
#include "aes_locl.h"
|
||||||
|
|
||||||
/* NOTE: the IV/counter CTR mode is big-endian. The rest of the AES code
|
/* 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.
|
* into the rest of the IV when incremented.
|
||||||
*/
|
*/
|
||||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
size_t length, const AES_KEY *key,
|
size_t length, const AES_KEY *key,
|
||||||
unsigned char ivec[AES_BLOCK_SIZE],
|
unsigned char ivec[AES_BLOCK_SIZE],
|
||||||
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
||||||
unsigned int *num) {
|
unsigned int *num) {
|
||||||
|
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
|
|
||||||
assert(in && out && key && counter && num);
|
OPENSSL_assert(in && out && key && ecount_buf && num);
|
||||||
assert(*num < AES_BLOCK_SIZE);
|
OPENSSL_assert(*num < AES_BLOCK_SIZE);
|
||||||
|
|
||||||
n = *num;
|
n = *num;
|
||||||
|
|
||||||
|
@ -44,9 +44,6 @@ lib: $(LIBOBJ)
|
|||||||
$(RANLIB) $(LIB) || echo Never mind.
|
$(RANLIB) $(LIB) || echo Never mind.
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
$(LIBOBJ): $(LIBSRC)
|
|
||||||
|
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <openssl/camellia.h>
|
#include <openssl/camellia.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
#include "cmll_locl.h"
|
#include "cmll_locl.h"
|
||||||
|
|
||||||
/* NOTE: the IV/counter CTR mode is big-endian. The rest of the Camellia code
|
/* 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;
|
unsigned int n;
|
||||||
|
|
||||||
assert(in && out && key && counter && num);
|
OPENSSL_assert(in && out && key && ecount_buf && num);
|
||||||
assert(*num < CAMELLIA_BLOCK_SIZE);
|
OPENSSL_assert(*num < CAMELLIA_BLOCK_SIZE);
|
||||||
|
|
||||||
n = *num;
|
n = *num;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user