summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/crypto.h')
-rw-r--r--src/lib/libcrypto/crypto.h65
1 files changed, 38 insertions, 27 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index fc6ff860af..273bc5e3f8 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -96,37 +96,39 @@ extern "C" {
96 * names in cryptlib.c 96 * names in cryptlib.c
97 */ 97 */
98 98
99#define CRYPTO_LOCK_ERR 1 99#define CRYPTO_LOCK_ERR 1
100#define CRYPTO_LOCK_EX_DATA 2 100#define CRYPTO_LOCK_EX_DATA 2
101#define CRYPTO_LOCK_X509 3 101#define CRYPTO_LOCK_X509 3
102#define CRYPTO_LOCK_X509_INFO 4 102#define CRYPTO_LOCK_X509_INFO 4
103#define CRYPTO_LOCK_X509_PKEY 5 103#define CRYPTO_LOCK_X509_PKEY 5
104#define CRYPTO_LOCK_X509_CRL 6 104#define CRYPTO_LOCK_X509_CRL 6
105#define CRYPTO_LOCK_X509_REQ 7 105#define CRYPTO_LOCK_X509_REQ 7
106#define CRYPTO_LOCK_DSA 8 106#define CRYPTO_LOCK_DSA 8
107#define CRYPTO_LOCK_RSA 9 107#define CRYPTO_LOCK_RSA 9
108#define CRYPTO_LOCK_EVP_PKEY 10 108#define CRYPTO_LOCK_EVP_PKEY 10
109#define CRYPTO_LOCK_X509_STORE 11 109#define CRYPTO_LOCK_X509_STORE 11
110#define CRYPTO_LOCK_SSL_CTX 12 110#define CRYPTO_LOCK_SSL_CTX 12
111#define CRYPTO_LOCK_SSL_CERT 13 111#define CRYPTO_LOCK_SSL_CERT 13
112#define CRYPTO_LOCK_SSL_SESSION 14 112#define CRYPTO_LOCK_SSL_SESSION 14
113#define CRYPTO_LOCK_SSL_SESS_CERT 15 113#define CRYPTO_LOCK_SSL_SESS_CERT 15
114#define CRYPTO_LOCK_SSL 16 114#define CRYPTO_LOCK_SSL 16
115#define CRYPTO_LOCK_RAND 17 115#define CRYPTO_LOCK_SSL_METHOD 17
116#define CRYPTO_LOCK_RAND2 18 116#define CRYPTO_LOCK_RAND 18
117#define CRYPTO_LOCK_MALLOC 19 117#define CRYPTO_LOCK_RAND2 19
118#define CRYPTO_LOCK_BIO 20 118#define CRYPTO_LOCK_MALLOC 20
119#define CRYPTO_LOCK_GETHOSTBYNAME 21 119#define CRYPTO_LOCK_BIO 21
120#define CRYPTO_LOCK_GETSERVBYNAME 22 120#define CRYPTO_LOCK_GETHOSTBYNAME 22
121#define CRYPTO_LOCK_READDIR 23 121#define CRYPTO_LOCK_GETSERVBYNAME 23
122#define CRYPTO_LOCK_RSA_BLINDING 24 122#define CRYPTO_LOCK_READDIR 24
123#define CRYPTO_LOCK_DH 25 123#define CRYPTO_LOCK_RSA_BLINDING 25
124#define CRYPTO_LOCK_MALLOC2 26 124#define CRYPTO_LOCK_DH 26
125#define CRYPTO_LOCK_DSO 27 125#define CRYPTO_LOCK_MALLOC2 27
126#define CRYPTO_LOCK_DYNLOCK 28 126#define CRYPTO_LOCK_DSO 28
127#define CRYPTO_LOCK_ENGINE 29 127#define CRYPTO_LOCK_DYNLOCK 29
128#define CRYPTO_LOCK_UI 30 128#define CRYPTO_LOCK_ENGINE 30
129#define CRYPTO_NUM_LOCKS 31 129#define CRYPTO_LOCK_UI 31
130#define CRYPTO_LOCK_HWCRHK 32 /* This is a HACK which will disappear in 0.9.8 */
131#define CRYPTO_NUM_LOCKS 33
130 132
131#define CRYPTO_LOCK 1 133#define CRYPTO_LOCK 1
132#define CRYPTO_UNLOCK 2 134#define CRYPTO_UNLOCK 2
@@ -148,7 +150,7 @@ extern "C" {
148#endif 150#endif
149#else 151#else
150#define CRYPTO_w_lock(a) 152#define CRYPTO_w_lock(a)
151#define CRYPTO_w_unlock(a) 153#define CRYPTO_w_unlock(a)
152#define CRYPTO_r_lock(a) 154#define CRYPTO_r_lock(a)
153#define CRYPTO_r_unlock(a) 155#define CRYPTO_r_unlock(a)
154#define CRYPTO_add(a,b,c) ((*(a))+=(b)) 156#define CRYPTO_add(a,b,c) ((*(a))+=(b))
@@ -278,6 +280,8 @@ int CRYPTO_is_mem_check_on(void);
278#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) 280#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)
279#define OPENSSL_realloc(addr,num) \ 281#define OPENSSL_realloc(addr,num) \
280 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) 282 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
283#define OPENSSL_realloc_clean(addr,old_num,num) \
284 CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)
281#define OPENSSL_remalloc(addr,num) \ 285#define OPENSSL_remalloc(addr,num) \
282 CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__) 286 CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
283#define OPENSSL_freeFunc CRYPTO_free 287#define OPENSSL_freeFunc CRYPTO_free
@@ -380,8 +384,12 @@ void CRYPTO_free_locked(void *);
380void *CRYPTO_malloc(int num, const char *file, int line); 384void *CRYPTO_malloc(int num, const char *file, int line);
381void CRYPTO_free(void *); 385void CRYPTO_free(void *);
382void *CRYPTO_realloc(void *addr,int num, const char *file, int line); 386void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
387void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
388 int line);
383void *CRYPTO_remalloc(void *addr,int num, const char *file, int line); 389void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
384 390
391void OPENSSL_cleanse(void *ptr, size_t len);
392
385void CRYPTO_set_mem_debug_options(long bits); 393void CRYPTO_set_mem_debug_options(long bits);
386long CRYPTO_get_mem_debug_options(void); 394long CRYPTO_get_mem_debug_options(void);
387 395
@@ -422,6 +430,9 @@ void CRYPTO_mem_leaks(struct bio_st *bio);
422typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *); 430typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *);
423void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); 431void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
424 432
433/* die if we have to */
434void OpenSSLDie(const char *file,int line,const char *assertion);
435#define OPENSSL_assert(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
425 436
426/* BEGIN ERROR CODES */ 437/* BEGIN ERROR CODES */
427/* The following lines are auto generated by the script mkerr.pl. Any changes 438/* The following lines are auto generated by the script mkerr.pl. Any changes