globals.txt 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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.
  8. cryptlib.c
  9. ===========================================
  10. static STACK *app_locks=NULL;
  11. static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
  12. static void (MS_FAR *locking_callback)(int mode,int type,
  13. const char *file,int line)=NULL;
  14. static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
  15. int type,const char *file,int line)=NULL;
  16. static unsigned long (MS_FAR *id_callback)(void)=NULL;
  17. static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
  18. (const char *file,int line)=NULL;
  19. static void (MS_FAR *dynlock_lock_callback)(int mode,
  20. struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL;
  21. static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
  22. const char *file,int line)=NULL;
  23. mem.c
  24. ===========================================
  25. static int allow_customize = 1; /* we provide flexible functions for */
  26. static int allow_customize_debug = 1;/* exchanging memory-related functions at
  27. /* may be changed as long as `allow_customize' is set */
  28. static void *(*malloc_locked_func)(size_t) = malloc;
  29. static void (*free_locked_func)(void *) = free;
  30. static void *(*malloc_func)(size_t) = malloc;
  31. static void *(*realloc_func)(void *, size_t)= realloc;
  32. static void (*free_func)(void *) = free;
  33. /* use default functions from mem_dbg.c */
  34. static void (*malloc_debug_func)(void *,int,const char *,int,int)
  35. = CRYPTO_dbg_malloc;
  36. static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
  37. = CRYPTO_dbg_realloc;
  38. static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free;
  39. static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options;
  40. static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options;
  41. mem_dbg.c
  42. ===========================================
  43. static int mh_mode=CRYPTO_MEM_CHECK_OFF;
  44. static unsigned long order = 0; /* number of memory requests */
  45. static LHASH *mh=NULL; /* hash-table of memory requests (address as key) */
  46. static LHASH *amih=NULL; /* hash-table with those app_mem_info_st's */
  47. static long options = /* extra information to be recorded */
  48. static unsigned long disabling_thread = 0;
  49. err.c
  50. ===========================================
  51. static LHASH *error_hash=NULL;
  52. static LHASH *thread_hash=NULL;
  53. several files have routines with static "init" to track if error strings
  54. have been loaded ( may not want seperate error strings for each process )
  55. The "init" variable can't be left "global" because the error has is a ptr
  56. that is malloc'ed. The malloc'ed error has is dependant on the "init"
  57. vars.
  58. files:
  59. pem_err.c
  60. cpt_err.c
  61. pk12err.c
  62. asn1_err.c
  63. bio_err.c
  64. bn_err.c
  65. buf_err.c
  66. comp_err.c
  67. conf_err.c
  68. cpt_err.c
  69. dh_err.c
  70. dsa_err.c
  71. dso_err.c
  72. evp_err.c
  73. obj_err.c
  74. pkcs7err.c
  75. rand_err.c
  76. rsa_err.c
  77. rsar_err.c
  78. ssl_err.c
  79. x509_err.c
  80. v3err.c
  81. err.c
  82. These file have similar "init" globals but they are for other stuff not
  83. error strings:
  84. bn_lib.c
  85. ecc_enc.c
  86. s23_clnt.c
  87. s23_meth.c
  88. s23_srvr.c
  89. s2_clnt.c
  90. s2_lib.c
  91. s2_meth.c
  92. s2_srvr.c
  93. s3_clnt.c
  94. s3_lib.c
  95. s3_srvr.c
  96. t1_clnt.c
  97. t1_meth.c
  98. t1_srvr.c
  99. rand_lib.c
  100. ===========================================
  101. static RAND_METHOD *rand_meth= &rand_ssleay_meth;
  102. md_rand.c
  103. ===========================================
  104. static int state_num=0,state_index=0;
  105. static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH];
  106. static unsigned char md[MD_DIGEST_LENGTH];
  107. static long md_count[2]={0,0};
  108. static double entropy=0;
  109. static int initialized=0;
  110. /* This should be set to 1 only when ssleay_rand_add() is called inside
  111. an already locked state, so it doesn't try to lock and thereby cause
  112. a hang. And it should always be reset back to 0 before unlocking. */
  113. static int add_do_not_lock=0;
  114. obj_dat.c
  115. ============================================
  116. static int new_nid=NUM_NID;
  117. static LHASH *added=NULL;
  118. b_sock.c
  119. ===========================================
  120. static unsigned long BIO_ghbn_hits=0L;
  121. static unsigned long BIO_ghbn_miss=0L;
  122. static struct ghbn_cache_st
  123. {
  124. char name[129];
  125. struct hostent *ent;
  126. unsigned long order;
  127. } ghbn_cache[GHBN_NUM];
  128. static int wsa_init_done=0;
  129. bio_lib.c
  130. ===========================================
  131. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *bio_meth=NULL;
  132. static int bio_meth_num=0;
  133. bn_lib.c
  134. ========================================
  135. static int bn_limit_bits=0;
  136. static int bn_limit_num=8; /* (1<<bn_limit_bits) */
  137. static int bn_limit_bits_low=0;
  138. static int bn_limit_num_low=8; /* (1<<bn_limit_bits_low) */
  139. static int bn_limit_bits_high=0;
  140. static int bn_limit_num_high=8; /* (1<<bn_limit_bits_high) */
  141. static int bn_limit_bits_mont=0;
  142. static int bn_limit_num_mont=8; /* (1<<bn_limit_bits_mont) */
  143. conf_lib.c
  144. ========================================
  145. static CONF_METHOD *default_CONF_method=NULL;
  146. dh_lib.c
  147. ========================================
  148. static DH_METHOD *default_DH_method;
  149. static int dh_meth_num = 0;
  150. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
  151. dsa_lib.c
  152. ========================================
  153. static DSA_METHOD *default_DSA_method;
  154. static int dsa_meth_num = 0;
  155. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL;
  156. dso_lib.c
  157. ========================================
  158. static DSO_METHOD *default_DSO_meth = NULL;
  159. rsa_lib.c
  160. ========================================
  161. static RSA_METHOD *default_RSA_meth=NULL;
  162. static int rsa_meth_num=0;
  163. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *rsa_meth=NULL;
  164. x509_trs.c
  165. =======================================
  166. static int (*default_trust)(int id, X509 *x, int flags) = obj_trust;
  167. static STACK_OF(X509_TRUST) *trtable = NULL;
  168. x509_req.c
  169. =======================================
  170. static int *ext_nids = ext_nid_list;
  171. o_names.c
  172. ======================================
  173. static LHASH *names_lh=NULL;
  174. static STACK_OF(NAME_FUNCS) *name_funcs_stack;
  175. static int free_type;
  176. static int names_type_num=OBJ_NAME_TYPE_NUM;
  177. th-lock.c - NEED to add support for locking for NetWare
  178. ==============================================
  179. static long *lock_count;
  180. (other platform specific globals)
  181. x_x509.c
  182. ==============================================
  183. static int x509_meth_num = 0;
  184. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL;
  185. evp_pbe.c
  186. ============================================
  187. static STACK *pbe_algs;
  188. evp_key.c
  189. ============================================
  190. static char prompt_string[80];
  191. ssl_ciph.c
  192. ============================================
  193. static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
  194. ssl_lib.c
  195. =============================================
  196. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_meth=NULL;
  197. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_ctx_meth=NULL;
  198. static int ssl_meth_num=0;
  199. static int ssl_ctx_meth_num=0;
  200. ssl_sess.c
  201. =============================================
  202. static int ssl_session_num=0;
  203. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_session_meth=NULL;
  204. x509_vfy.c
  205. ============================================
  206. static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_method=NULL;
  207. static int x509_store_ctx_num=0;