Move CRYPTO_memcmp to o_init.c when compiling with fips: cryptlib.o

is in the fips module for fips capable builds.
This commit is contained in:
Dr. Stephen Henson
2013-01-31 14:31:11 +00:00
parent 99f5093347
commit 24b2806097
2 changed files with 17 additions and 0 deletions

View File

@@ -93,4 +93,18 @@ void OPENSSL_init(void)
#endif
}
#ifdef OPENSSL_FIPS
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
{
size_t i;
const unsigned char *a = in_a;
const unsigned char *b = in_b;
unsigned char x = 0;
for (i = 0; i < len; i++)
x |= a[i] ^ b[i];
return x;
}
#endif