Don't change NUM_LOCKS value for non-FIPS builds.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user