X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcrypto.h;h=af678a7489fa5c525f7855d629ef54faf5bb0499;hp=6f83650df84cf08efc7930b3116f09c0c5d841b7;hb=32654e792b8863024cfaff8e22cd1d53a5ff5626;hpb=e5acb2bd2e80a0d6923b2b0602e4821597284a8b diff --git a/crypto/crypto.h b/crypto/crypto.h index 6f83650df8..af678a7489 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -61,7 +61,7 @@ #include -#ifndef NO_FP_API +#ifndef OPENSSL_NO_FP_API #include #endif @@ -73,10 +73,9 @@ #include #endif -#if defined(VMS) || defined(__VMS) -#include "vms_idhacks.h" -#endif - +/* Resolve problems on some operating systems with symbol names that clash + one way or another */ +#include #ifdef __cplusplus extern "C" { @@ -91,6 +90,7 @@ extern "C" { #define SSLEAY_CFLAGS 2 #define SSLEAY_BUILT_ON 3 #define SSLEAY_PLATFORM 4 +#define SSLEAY_DIR 5 /* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock * names in cryptlib.c @@ -123,14 +123,15 @@ extern "C" { #define CRYPTO_LOCK_MALLOC2 25 #define CRYPTO_LOCK_DSO 26 #define CRYPTO_LOCK_DYNLOCK 27 -#define CRYPTO_NUM_LOCKS 28 +#define CRYPTO_LOCK_ENGINE 28 +#define CRYPTO_NUM_LOCKS 29 #define CRYPTO_LOCK 1 #define CRYPTO_UNLOCK 2 #define CRYPTO_READ 4 #define CRYPTO_WRITE 8 -#ifndef NO_LOCKING +#ifndef OPENSSL_NO_LOCKING #ifndef CRYPTO_w_lock #define CRYPTO_w_lock(type) \ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) @@ -275,19 +276,15 @@ int CRYPTO_is_mem_check_on(void); #define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr) -/* Case insensiteve linking causes problems.... */ -#if defined(WIN16) || defined(VMS) -#define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings -#endif - - const char *SSLeay_version(int type); unsigned long SSLeay(void); +int OPENSSL_issetugid(void); + int CRYPTO_get_ex_new_index(int idx, STACK_OF(CRYPTO_EX_DATA_FUNCS) **skp, long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); -void *CRYPTO_get_ex_data(CRYPTO_EX_DATA *ad,int idx); +void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad,int idx); int CRYPTO_dup_ex_data(STACK_OF(CRYPTO_EX_DATA_FUNCS) *meth, CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from); void CRYPTO_free_ex_data(STACK_OF(CRYPTO_EX_DATA_FUNCS) *meth, void *obj, CRYPTO_EX_DATA *ad); @@ -326,6 +323,11 @@ void (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l * call the latter last if you need different functions */ int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *)); int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *)); +int CRYPTO_set_mem_ex_functions(void *(*m)(size_t,const char *,int), + void *(*r)(void *,size_t,const char *,int), + void (*f)(void *)); +int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t,const char *,int), + void (*free_func)(void *)); int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), void (*r)(void *,void *,int,const char *,int,int), void (*f)(void *,int), @@ -333,6 +335,11 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), long (*go)(void)); void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); +void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int), + void *(**r)(void *, size_t,const char *,int), + void (**f)(void *)); +void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t,const char *,int), + void (**f)(void *)); void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), void (**r)(void *,void *,int,const char *,int,int), void (**f)(void *,int), @@ -375,12 +382,13 @@ void CRYPTO_dbg_free(void *addr,int before_p); void CRYPTO_dbg_set_options(long bits); long CRYPTO_dbg_get_options(void); -#ifndef NO_FP_API +#ifndef OPENSSL_NO_FP_API void CRYPTO_mem_leaks_fp(FILE *); #endif void CRYPTO_mem_leaks(struct bio_st *bio); /* unsigned long order, char *file, int line, int num_bytes, char *addr */ -void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *)); +typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *); +void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); void ERR_load_CRYPTO_strings(void);