X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcrypto.h;h=84d3520ec23aca981021584dfcb190ca438ba57a;hp=bcc8ca4ad3bca1ab3d59ec0d4bf5393f3ec22ca9;hb=ad6019d6c0d22f384838b2f9ca339bdabed331a5;hpb=4c3296960de32e5abfbb8f4703a2ce624d82669f diff --git a/crypto/crypto.h b/crypto/crypto.h index bcc8ca4ad3..84d3520ec2 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -219,7 +219,9 @@ typedef struct openssl_item_st #define CRYPTO_LOCK_EC_PRE_COMP 36 #define CRYPTO_LOCK_STORE 37 #define CRYPTO_LOCK_COMP 38 -#define CRYPTO_NUM_LOCKS 39 +#define CRYPTO_LOCK_FIPS 39 +#define CRYPTO_LOCK_FIPS2 40 +#define CRYPTO_NUM_LOCKS 41 #define CRYPTO_LOCK 1 #define CRYPTO_UNLOCK 2 @@ -247,6 +249,10 @@ typedef struct openssl_item_st #define CRYPTO_add(a,b,c) ((*(a))+=(b)) #endif +#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSEVP) +#define CRYPTO_lock FIPS_lock +#endif + /* Some applications as well as some parts of OpenSSL need to allocate and deallocate locks in a dynamic fashion. The following typedef makes this possible in a type-safe manner. */ @@ -364,6 +370,7 @@ int CRYPTO_is_mem_check_on(void); #define is_MemCheck_on() CRYPTO_is_mem_check_on() #define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) +#define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__) #define OPENSSL_realloc(addr,num) \ CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) #define OPENSSL_realloc_clean(addr,old_num,num) \ @@ -487,6 +494,7 @@ void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), void *CRYPTO_malloc_locked(int num, const char *file, int line); void CRYPTO_free_locked(void *); void *CRYPTO_malloc(int num, const char *file, int line); +char *CRYPTO_strdup(const char *str, const char *file, int line); void CRYPTO_free(void *); void *CRYPTO_realloc(void *addr,int num, const char *file, int line); void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, @@ -539,8 +547,9 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); void OpenSSLDie(const char *file,int line,const char *assertion); #define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1)) -unsigned long *OPENSSL_ia32cap_loc(void); -#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc())) +unsigned int *OPENSSL_ia32cap_loc(void); +#define OPENSSL_ia32cap ((OPENSSL_ia32cap_loc())[0]) +int OPENSSL_isservice(void); /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes