X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_lib.c;h=f77fdb75fd9a075b625c0b39677f3342525a21c2;hb=4568182a8b8cbfd15cbc175189029ac547bd1762;hp=5470fbe6ef374721ef58c1fb801ef34f7a3e7f8f;hpb=a68c7b9171df3814b111eb467ef308617ea05463;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 5470fbe6ef..f77fdb75fd 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -61,12 +61,15 @@ # define NDEBUG #endif +#define OPENSSL_FIPSAPI + #include #include #include #include "cryptlib.h" #include "bn_lcl.h" +__fips_constseg const char BN_version[]="Big Number" OPENSSL_VERSION_PTEXT; /* This stuff appears to be completely unused, so is deprecated */ @@ -139,27 +142,9 @@ const BIGNUM *BN_value_one(void) return(&const_one); } -char *BN_options(void) - { - static int init=0; - static char data[16]; - - if (!init) - { - init++; -#ifdef BN_LLONG - BIO_snprintf(data,sizeof data,"bn(%d,%d)", - (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); -#else - BIO_snprintf(data,sizeof data,"bn(%d,%d)", - (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); -#endif - } - return(data); - } - int BN_num_bits_word(BN_ULONG l) { + __fips_constseg static const unsigned char bits[256]={ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,