Don't change NUM_LOCKS value for non-FIPS builds.

This commit is contained in:
Dr. Stephen Henson
2008-09-17 15:07:41 +00:00
parent 9b809d6278
commit 364f36f851
2 changed files with 12 additions and 2 deletions

View File

@@ -219,9 +219,13 @@ typedef struct openssl_item_st
#define CRYPTO_LOCK_EC_PRE_COMP 36
#define CRYPTO_LOCK_STORE 37
#define CRYPTO_LOCK_COMP 38
#ifndef OPENSSL_FIPS
#define CRYPTO_NUM_LOCKS 39
#else
#define CRYPTO_LOCK_FIPS 39
#define CRYPTO_LOCK_FIPS2 40
#define CRYPTO_NUM_LOCKS 41
#endif
#define CRYPTO_LOCK 1
#define CRYPTO_UNLOCK 2

View File

@@ -166,10 +166,16 @@ static const char* const lock_names[CRYPTO_NUM_LOCKS] =
"ec_pre_comp",
"store",
"comp",
#ifndef OPENSSL_FIPS
# if CRYPTO_NUM_LOCKS != 39
# error "Inconsistency between crypto.h and cryptlib.c"
# endif
#else
"fips",
"fips2",
#if CRYPTO_NUM_LOCKS != 41
# error "Inconsistency between crypto.h and cryptlib.c"
# if CRYPTO_NUM_LOCKS != 41
# error "Inconsistency between crypto.h and cryptlib.c"
# endif
#endif
};