summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-01-07 15:06:38 -0500
committerRich Salz <rsalz@openssl.org>2016-01-07 15:14:18 -0500
commitbbd86bf5424a611cb6b77a3a17fc522931c4dcb8 (patch)
treecc45d4fb29946c41879e563547a877a70b0c957a /util
parent3cb8c3265f639f8eebf32053457ae6a6d61e2413 (diff)
mem functions cleanup
Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/libeay.num46
1 files changed, 16 insertions, 30 deletions
diff --git a/util/libeay.num b/util/libeay.num
index a202fcab80..45e0d28ab5 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -159,16 +159,15 @@ BN_value_one 166 1_1_0 EXIST::FUNCTION:
BUF_MEM_free 167 1_1_0 EXIST::FUNCTION:
BUF_MEM_grow 168 1_1_0 EXIST::FUNCTION:
BUF_MEM_new 169 1_1_0 EXIST::FUNCTION:
-BUF_strdup 170 1_1_0 NOEXIST::FUNCTION:
CONF_free 171 1_1_0 EXIST::FUNCTION:
CONF_get_number 172 1_1_0 EXIST::FUNCTION:
CONF_get_section 173 1_1_0 EXIST::FUNCTION:
CONF_get_string 174 1_1_0 EXIST::FUNCTION:
CONF_load 175 1_1_0 EXIST::FUNCTION:
CRYPTO_add_lock 176 1_1_0 EXIST::FUNCTION:
-CRYPTO_dbg_free 177 1_1_0 EXIST::FUNCTION:
-CRYPTO_dbg_malloc 178 1_1_0 EXIST::FUNCTION:
-CRYPTO_dbg_realloc 179 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_debug_free 177 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_debug_malloc 178 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_debug_realloc 179 1_1_0 EXIST::FUNCTION:
CRYPTO_dbg_remalloc 180 1_1_0 NOEXIST::FUNCTION:
CRYPTO_free 181 1_1_0 EXIST::FUNCTION:
CRYPTO_get_add_lock_callback 182 1_1_0 EXIST::FUNCTION:
@@ -180,7 +179,7 @@ CRYPTO_lock 187 1_1_0 EXIST::FUNCTION:
CRYPTO_malloc 188 1_1_0 EXIST::FUNCTION:
CRYPTO_mem_ctrl 189 1_1_0 EXIST::FUNCTION:
CRYPTO_mem_leaks 190 1_1_0 EXIST::FUNCTION:
-CRYPTO_mem_leaks_cb 191 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_leaks_cb 191 1_1_0 NOEXIST::FUNCTION:
CRYPTO_mem_leaks_fp 192 1_1_0 EXIST::FUNCTION:STDIO
CRYPTO_realloc 193 1_1_0 EXIST::FUNCTION:
CRYPTO_remalloc 194 1_1_0 NOEXIST::FUNCTION:
@@ -1679,14 +1678,12 @@ PKCS7_simple_smimecap 2153 1_1_0 EXIST::FUNCTION:
PKCS7_get_smimecap 2154 1_1_0 EXIST::FUNCTION:
PKCS7_sign 2155 1_1_0 EXIST::FUNCTION:
PKCS7_add_attrib_smimecap 2156 1_1_0 EXIST::FUNCTION:
-CRYPTO_dbg_set_options 2157 1_1_0 EXIST::FUNCTION:
+CRYPTO_dbg_set_options 2157 1_1_0 NOEXIST::FUNCTION:
CRYPTO_remove_all_info 2158 1_1_0 NOEXIST::FUNCTION:
-CRYPTO_get_mem_debug_functions 2159 1_1_0 EXIST::FUNCTION:
-CRYPTO_is_mem_check_on 2160 1_1_0 EXIST::FUNCTION:
-CRYPTO_set_mem_debug_functions 2161 1_1_0 EXIST::FUNCTION:
-CRYPTO_mem_debug_pop 2162 1_1_0 EXIST::FUNCTION:
-CRYPTO_mem_debug_push 2163 1_1_0 EXIST::FUNCTION:
-CRYPTO_set_mem_debug_options 2164 1_1_0 EXIST::FUNCTION:
+CRYPTO_get_mem_debug_functions 2159 1_1_0 NOEXIST::FUNCTION:
+CRYPTO_is_mem_check_on 2160 1_1_0 NOEXIST::FUNCTION:
+CRYPTO_set_mem_debug_functions 2161 1_1_0 NOEXIST::FUNCTION:
+CRYPTO_set_mem_debug_options 2164 1_1_0 NOEXIST::FUNCTION:
PEM_write_PKCS8PrivateKey_nid 2165 1_1_0 EXIST::FUNCTION:STDIO
PEM_write_bio_PKCS8PrivateKey_nid 2166 1_1_0 EXIST:!VMS:FUNCTION:
PEM_write_bio_PKCS8PrivKey_nid 2166 1_1_0 EXIST:VMS:FUNCTION:
@@ -1750,9 +1747,9 @@ BN_CTX_start 2242 1_1_0 EXIST::FUNCTION:
BN_CTX_get 2243 1_1_0 EXIST::FUNCTION:
EVP_PKEY2PKCS8_broken 2244 1_1_0 EXIST::FUNCTION:
ASN1_STRING_TABLE_add 2245 1_1_0 EXIST::FUNCTION:
-CRYPTO_dbg_get_options 2246 1_1_0 EXIST::FUNCTION:
+CRYPTO_dbg_get_options 2246 1_1_0 NOEXIST::FUNCTION:
AUTHORITY_INFO_ACCESS_new 2247 1_1_0 EXIST::FUNCTION:
-CRYPTO_get_mem_debug_options 2248 1_1_0 EXIST::FUNCTION:
+CRYPTO_get_mem_debug_options 2248 1_1_0 NOEXIST::FUNCTION:
DES_crypt 2249 1_1_0 EXIST::FUNCTION:DES
PEM_write_bio_X509_REQ_NEW 2250 1_1_0 EXIST::FUNCTION:
PEM_write_X509_REQ_NEW 2251 1_1_0 EXIST::FUNCTION:
@@ -2233,7 +2230,6 @@ DIRECTORYSTRING_it 2767 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION
DIRECTORYSTRING_it 2767 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
d2i_OCSP_CRLID 2768 1_1_0 EXIST::FUNCTION:
EC_POINT_is_on_curve 2769 1_1_0 EXIST::FUNCTION:EC
-CRYPTO_set_locked_mem_ex_funcs 2770 1_1_0 NOEXIST::FUNCTION:
CRYPTO_set_locked_mem_ex_functions 2770 1_1_0 NOEXIST::FUNCTION:
d2i_KRB5_CHECKSUM 2771 1_1_0 NOEXIST::FUNCTION:
ASN1_item_dup 2772 1_1_0 EXIST::FUNCTION:
@@ -2243,13 +2239,10 @@ BN_mod_add 2774 1_1_0 EXIST::FUNCTION:
KRB5_AUTHDATA_free 2775 1_1_0 NOEXIST::FUNCTION:
_ossl_old_des_cbc_cksum 2776 1_1_0 NOEXIST::FUNCTION:
ASN1_item_verify 2777 1_1_0 EXIST::FUNCTION:
-CRYPTO_set_mem_ex_functions 2778 1_1_0 EXIST::FUNCTION:
EC_POINT_get_Jprojective_coordinates_GFp 2779 1_1_0 EXIST:!VMS:FUNCTION:EC
EC_POINT_get_Jproj_coords_GFp 2779 1_1_0 EXIST:VMS:FUNCTION:EC
ZLONG_it 2780 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
ZLONG_it 2780 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
-CRYPTO_get_locked_mem_ex_funcs 2781 1_1_0 NOEXIST::FUNCTION:
-CRYPTO_get_locked_mem_ex_functions 2781 1_1_0 NOEXIST::FUNCTION:
ASN1_TIME_check 2782 1_1_0 EXIST::FUNCTION:
UI_get0_user_data 2783 1_1_0 EXIST::FUNCTION:
HMAC_CTX_cleanup 2784 1_1_0 NOEXIST::FUNCTION:
@@ -2339,7 +2332,6 @@ OCSP_ONEREQ_get_ext 2851 1_1_0 EXIST::FUNCTION:
EC_POINT_method_of 2852 1_1_0 EXIST::FUNCTION:EC
i2d_KRB5_APREQBODY 2853 1_1_0 NOEXIST::FUNCTION:
_ossl_old_des_ecb3_encrypt 2854 1_1_0 NOEXIST::FUNCTION:
-CRYPTO_get_mem_ex_functions 2855 1_1_0 EXIST::FUNCTION:
ENGINE_get_ex_data 2856 1_1_0 EXIST::FUNCTION:ENGINE
UI_destroy_method 2857 1_1_0 EXIST::FUNCTION:
ASN1_item_i2d_bio 2858 1_1_0 EXIST::FUNCTION:
@@ -2786,10 +2778,8 @@ EVP_des_ede3_ecb 3236 1_1_0 EXIST::FUNCTION:DES
X509_REQ_print_ex 3237 1_1_0 EXIST::FUNCTION:
ENGINE_up_ref 3238 1_1_0 EXIST::FUNCTION:ENGINE
BUF_MEM_grow_clean 3239 1_1_0 EXIST::FUNCTION:
-CRYPTO_clear_realloc 3240 1_1_0 EXIST::FUNCTION:
BUF_strlcat 3241 1_1_0 NOEXIST::FUNCTION:
BIO_indent 3242 1_1_0 EXIST::FUNCTION:
-BUF_strlcpy 3243 1_1_0 NOEXIST::FUNCTION:
OpenSSLDie 3244 1_1_0 EXIST::FUNCTION:
OPENSSL_cleanse 3245 1_1_0 EXIST::FUNCTION:
ENGINE_setup_bsd_cryptodev 3246 1_1_0 EXIST:__FreeBSD__:FUNCTION:ENGINE
@@ -3051,7 +3041,6 @@ STORE_meth_set_delete_fn 3486 1_1_0 NOEXIST::FUNCTION:
STORE_method_set_delete_function 3486 1_1_0 NOEXIST::FUNCTION:
STORE_list_certificate_next 3487 1_1_0 NOEXIST::FUNCTION:
ASN1_generate_nconf 3488 1_1_0 EXIST::FUNCTION:
-BUF_memdup 3489 1_1_0 NOEXIST::FUNCTION:
BN_GF2m_mod_mul 3490 1_1_0 EXIST::FUNCTION:EC2M
STORE_meth_get_list_next_fn 3491 1_1_0 NOEXIST::FUNCTION:
STORE_method_get_list_next_function 3491 1_1_0 NOEXIST::FUNCTION:
@@ -3077,7 +3066,6 @@ ECDSA_get_ex_data 3509 1_1_0 NOEXIST::FUNCTION:
SHA224 3510 1_1_0 EXIST::FUNCTION:
BIO_dump_indent_fp 3511 1_1_0 EXIST::FUNCTION:STDIO
EC_KEY_set_group 3512 1_1_0 EXIST::FUNCTION:EC
-BUF_strndup 3513 1_1_0 NOEXIST::FUNCTION:
STORE_list_certificate_start 3514 1_1_0 NOEXIST::FUNCTION:
BN_GF2m_mod 3515 1_1_0 EXIST::FUNCTION:EC2M
X509_REQ_check_private_key 3516 1_1_0 EXIST::FUNCTION:
@@ -3655,7 +3643,6 @@ FIPS_dsa_sig_decode 4049 1_1_0 NOEXIST::FUNCTION:
EVP_CIPHER_CTX_clear_flags 4050 1_1_0 EXIST::FUNCTION:
FIPS_rand_status 4051 1_1_0 NOEXIST::FUNCTION:
FIPS_rand_set_key 4052 1_1_0 NOEXIST::FUNCTION:
-CRYPTO_set_mem_info_functions 4053 1_1_0 NOEXIST::FUNCTION:
RSA_X931_generate_key_ex 4054 1_1_0 EXIST::FUNCTION:RSA
int_ERR_set_state_func 4055 1_1_0 NOEXIST::FUNCTION:
int_EVP_MD_set_engine_callbacks 4056 1_1_0 NOEXIST::FUNCTION:
@@ -4393,7 +4380,6 @@ X509_VERIFY_PARAM_get0 4762 1_1_0 EXIST::FUNCTION:
X509V3_EXT_free 4763 1_1_0 NOEXIST::FUNCTION:
BIO_hex_string 4764 1_1_0 EXIST::FUNCTION:
X509_VERIFY_PARAM_set_hostflags 4765 1_1_0 EXIST::FUNCTION:
-BUF_strnlen 4766 1_1_0 NOEXIST::FUNCTION:
X509_VERIFY_PARAM_get0_peername 4767 1_1_0 EXIST::FUNCTION:
ECDSA_METHOD_set_app_data 4768 1_1_0 NOEXIST::FUNCTION:
sk_deep_copy 4769 1_1_0 EXIST::FUNCTION:
@@ -4560,7 +4546,6 @@ PKCS5_pbe2_set_scrypt 4931 1_1_0 EXIST::FUNCTION:SCRYPT
PKCS8_set0_pbe 4932 1_1_0 EXIST::FUNCTION:
DH_bits 4933 1_1_0 EXIST::FUNCTION:DH
RSA_bits 4934 1_1_0 EXIST::FUNCTION:RSA
-CRYPTO_set_secure_mem_ex_functions 4935 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_allocated 4936 1_1_0 EXIST::FUNCTION:
BN_CTX_secure_new 4937 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_malloc 4938 1_1_0 EXIST::FUNCTION:
@@ -4568,12 +4553,9 @@ CRYPTO_secure_malloc_done 4939 1_1_0 EXIST::FUNCTION:
BUF_MEM_new_ex 4940 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_malloc_initialized 4941 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_malloc_init 4942 1_1_0 EXIST::FUNCTION:
-CRYPTO_get_secure_mem_functions 4943 1_1_0 EXIST::FUNCTION:
BN_secure_new 4944 1_1_0 EXIST::FUNCTION:
CRYPTO_secure_free 4945 1_1_0 EXIST::FUNCTION:
BIO_s_secmem 4946 1_1_0 EXIST::FUNCTION:
-CRYPTO_get_secure_mem_ex_functions 4947 1_1_0 EXIST::FUNCTION:
-CRYPTO_set_secure_mem_functions 4948 1_1_0 EXIST::FUNCTION:
X509_STORE_CTX_get_num_untrusted 4949 1_1_0 EXIST::FUNCTION:
X509_up_ref 4950 1_1_0 EXIST::FUNCTION:
X509_REQ_get_version 4951 1_1_0 EXIST::FUNCTION:
@@ -4732,8 +4714,12 @@ EC_KEY_oct2key 5107 1_1_0 EXIST::FUNCTION:EC
OPENSSL_strlcpy 5108 1_1_0 EXIST::FUNCTION:
OPENSSL_strnlen 5109 1_1_0 EXIST::FUNCTION:
OPENSSL_strlcat 5110 1_1_0 EXIST::FUNCTION:
-OPENSSL_memdup 5111 1_1_0 NOEXIST::FUNCTION:
CRYPTO_memdup 5112 1_1_0 EXIST::FUNCTION:
CRYPTO_strndup 5113 1_1_0 EXIST::FUNCTION:
X509_VERIFY_PARAM_move_peername 5114 1_1_0 EXIST::FUNCTION:
X509_STORE_CTX_set0_dane 5115 1_1_0 EXIST::FUNCTION:
+CRYPTO_secure_used 5116 1_1_0 EXIST::FUNCTION:
+CRYPTO_clear_realloc 5117 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_debug_push 5118 1_1_0 EXIST::FUNCTION:
+CRYPTO_set_mem_debug 5119 1_1_0 EXIST::FUNCTION:
+CRYPTO_mem_debug_pop 5120 1_1_0 EXIST::FUNCTION: