What does "__fips_constseg" means in openssl -
in openssl c code, (aes_core.c, set_key.c, spr.h , on) there "__fips_constseg".
i don't know "__fips_constseg" means.
what's role of it? assembly code?
the source code below:
#include < openssl/crypto.h >
#include "des_locl.h"
openssl_implement_global(int,des_check_key,0) /* defaults false */
__fips_constseg
static const unsigned char odd_parity[256]={};
from openssl source code:
#if defined(openssl_fipscanister) # include <openssl/fipssyms.h> #else # define __fips_constseg #endif
#if defined(_msc_ver) # pragma const_seg("fipsro$b") # pragma const_seg() # define __fips_constseg __declspec(allocate("fipsro$b")) #else # define __fips_constseg #endif
the __fips_constseg
constant defined value, if
openssl_fipscanister
defined and- the code compiled using microsoft c compiler (which can detected defined
_msc_ver
constant).
then, code marked constant placed in constant data segment named fipsro$b
(see msdn documentation on allocate
specifier details).
if of conditions above not met, __fips_constseg
defined nothing , variables marked constant put in data segment located in.
Comments
Post a Comment