1
An initial review of the OpenSSL code was done to determine how many
2
global variables where present. The idea was to determine the amount of
3
work required to pull the globals into an instance data structure in
4
order to build a Library NLM for NetWare. This file contains the results
5
of the review. Each file is listed along with the globals in the file.
6
The initial review was done very quickly so this list is probably
7
not a comprehensive list.
11
===========================================
13
static STACK *app_locks=NULL;
15
static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
17
static void (MS_FAR *locking_callback)(int mode,int type,
18
const char *file,int line)=NULL;
19
static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
20
int type,const char *file,int line)=NULL;
21
static unsigned long (MS_FAR *id_callback)(void)=NULL;
22
static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
23
(const char *file,int line)=NULL;
24
static void (MS_FAR *dynlock_lock_callback)(int mode,
25
struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL;
26
static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
27
const char *file,int line)=NULL;
31
===========================================
32
static int allow_customize = 1; /* we provide flexible functions for */
33
static int allow_customize_debug = 1;/* exchanging memory-related functions at
35
/* may be changed as long as `allow_customize' is set */
36
static void *(*malloc_locked_func)(size_t) = malloc;
37
static void (*free_locked_func)(void *) = free;
38
static void *(*malloc_func)(size_t) = malloc;
39
static void *(*realloc_func)(void *, size_t)= realloc;
40
static void (*free_func)(void *) = free;
42
/* use default functions from mem_dbg.c */
43
static void (*malloc_debug_func)(void *,int,const char *,int,int)
45
static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
47
static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free;
48
static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options;
49
static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options;
53
===========================================
54
static int mh_mode=CRYPTO_MEM_CHECK_OFF;
55
static unsigned long order = 0; /* number of memory requests */
56
static LHASH *mh=NULL; /* hash-table of memory requests (address as key) */
58
static LHASH *amih=NULL; /* hash-table with those app_mem_info_st's */
59
static long options = /* extra information to be recorded */
60
static unsigned long disabling_thread = 0;
64
===========================================
65
static LHASH *error_hash=NULL;
66
static LHASH *thread_hash=NULL;
68
several files have routines with static "init" to track if error strings
69
have been loaded ( may not want seperate error strings for each process )
70
The "init" variable can't be left "global" because the error has is a ptr
71
that is malloc'ed. The malloc'ed error has is dependant on the "init"
99
These file have similar "init" globals but they are for other stuff not
119
===========================================
120
static RAND_METHOD *rand_meth= &rand_ssleay_meth;
123
===========================================
124
static int state_num=0,state_index=0;
125
static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH];
126
static unsigned char md[MD_DIGEST_LENGTH];
127
static long md_count[2]={0,0};
128
static double entropy=0;
129
static int initialized=0;
131
/* This should be set to 1 only when ssleay_rand_add() is called inside
132
an already locked state, so it doesn't try to lock and thereby cause
133
a hang. And it should always be reset back to 0 before unlocking. */
134
static int add_do_not_lock=0;
137
============================================
138
static int new_nid=NUM_NID;
139
static LHASH *added=NULL;
142
===========================================
143
static unsigned long BIO_ghbn_hits=0L;
144
static unsigned long BIO_ghbn_miss=0L;
145
static struct ghbn_cache_st
150
} ghbn_cache[GHBN_NUM];
152
static int wsa_init_done=0;
156
===========================================
157
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *bio_meth=NULL;
158
static int bio_meth_num=0;
162
========================================
163
static int bn_limit_bits=0;
164
static int bn_limit_num=8; /* (1<<bn_limit_bits) */
165
static int bn_limit_bits_low=0;
166
static int bn_limit_num_low=8; /* (1<<bn_limit_bits_low) */
167
static int bn_limit_bits_high=0;
168
static int bn_limit_num_high=8; /* (1<<bn_limit_bits_high) */
169
static int bn_limit_bits_mont=0;
170
static int bn_limit_num_mont=8; /* (1<<bn_limit_bits_mont) */
173
========================================
174
static CONF_METHOD *default_CONF_method=NULL;
177
========================================
178
static DH_METHOD *default_DH_method;
179
static int dh_meth_num = 0;
180
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
183
========================================
184
static DSA_METHOD *default_DSA_method;
185
static int dsa_meth_num = 0;
186
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL;
189
========================================
190
static DSO_METHOD *default_DSO_meth = NULL;
193
========================================
194
static RSA_METHOD *default_RSA_meth=NULL;
195
static int rsa_meth_num=0;
196
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *rsa_meth=NULL;
199
=======================================
200
static int (*default_trust)(int id, X509 *x, int flags) = obj_trust;
201
static STACK_OF(X509_TRUST) *trtable = NULL;
204
=======================================
205
static int *ext_nids = ext_nid_list;
208
======================================
209
static LHASH *names_lh=NULL;
210
static STACK_OF(NAME_FUNCS) *name_funcs_stack;
211
static int free_type;
212
static int names_type_num=OBJ_NAME_TYPE_NUM;
215
th-lock.c - NEED to add support for locking for NetWare
216
==============================================
217
static long *lock_count;
218
(other platform specific globals)
221
==============================================
222
static int x509_meth_num = 0;
223
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL;
227
============================================
228
static STACK *pbe_algs;
231
============================================
232
static char prompt_string[80];
235
============================================
236
static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
239
=============================================
240
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_meth=NULL;
241
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_ctx_meth=NULL;
242
static int ssl_meth_num=0;
243
static int ssl_ctx_meth_num=0;
246
=============================================
247
static int ssl_session_num=0;
248
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_session_meth=NULL;
251
============================================
252
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_method=NULL;
253
static int x509_store_ctx_num=0;