os/ossrv/ssl/libcrypto/src/crypto/libcrypto_wsd.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
sl@0
     3
sl@0
     4
Redistribution and use in source and binary forms, with or without 
sl@0
     5
modification, are permitted provided that the following conditions are met:
sl@0
     6
sl@0
     7
* Redistributions of source code must retain the above copyright notice, this 
sl@0
     8
  list of conditions and the following disclaimer.
sl@0
     9
* Redistributions in binary form must reproduce the above copyright notice, 
sl@0
    10
  this list of conditions and the following disclaimer in the documentation 
sl@0
    11
  and/or other materials provided with the distribution.
sl@0
    12
* Neither the name of Nokia Corporation nor the names of its contributors 
sl@0
    13
  may be used to endorse or promote products derived from this software 
sl@0
    14
  without specific prior written permission.
sl@0
    15
sl@0
    16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
sl@0
    17
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
sl@0
    18
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
sl@0
    19
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
sl@0
    20
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
sl@0
    21
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
sl@0
    22
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
sl@0
    23
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
sl@0
    24
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
sl@0
    25
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
sl@0
    26
sl@0
    27
Description:
sl@0
    28
*/
sl@0
    29
sl@0
    30
#ifndef _LIBCRYPTO_WSD_H
sl@0
    31
#define _LIBCRYPTO_WSD_H
sl@0
    32
sl@0
    33
#include <_ansi.h>
sl@0
    34
#include <sys/cdefs.h>
sl@0
    35
#include <stdio.h>
sl@0
    36
#include <stdlib.h>
sl@0
    37
#include <errno.h>
sl@0
    38
#include <sys/types.h>
sl@0
    39
#include <sys/cdefs.h>
sl@0
    40
#include <sys/socket.h>
sl@0
    41
#include <sys/types.h>
sl@0
    42
#include <sys/ioctl.h>
sl@0
    43
#include <netinet/in.h>
sl@0
    44
#include <libcrypto_wsd_macros.h>
sl@0
    45
#include "cryptlib.h"
sl@0
    46
#include <openssl/asn1.h>
sl@0
    47
#include <openssl/lhash.h>
sl@0
    48
#include <openssl/crypto.h>
sl@0
    49
#include <openssl/err.h>
sl@0
    50
#include <openssl/bn.h>
sl@0
    51
#include <openssl/comp.h>
sl@0
    52
#include <openssl/dso.h>
sl@0
    53
#include <openssl/des.h>
sl@0
    54
#include <openssl/engine.h>
sl@0
    55
#include <openssl/lhash.h>
sl@0
    56
#include <openssl/ossl_typ.h>
sl@0
    57
#include "eng_int.h"
sl@0
    58
#include "rand_lcl.h"
sl@0
    59
#include <openssl/bio.h>
sl@0
    60
#include <openssl/conf.h>
sl@0
    61
#include <openssl/dh.h>
sl@0
    62
#include <openssl/dso.h>
sl@0
    63
#include <openssl/dsa.h>
sl@0
    64
#include <openssl/rsa.h>
sl@0
    65
#include <openssl/store.h>
sl@0
    66
#include <openssl/x509v3.h>
sl@0
    67
#include <openssl/ui.h>
sl@0
    68
#include <openssl/rand.h>
sl@0
    69
#include "str_locl.h"
sl@0
    70
#include "ui_locl.h"
sl@0
    71
#include <zlib.h>
sl@0
    72
sl@0
    73
#ifdef EMULATOR
sl@0
    74
#define BN_NIST_256_TOP	(256+BN_BITS2-1)/BN_BITS2
sl@0
    75
#define BN_NIST_384_TOP	(384+BN_BITS2-1)/BN_BITS2
sl@0
    76
sl@0
    77
# define Z_CALLCONV
sl@0
    78
sl@0
    79
typedef int (Z_CALLCONV *compress_ft)(Bytef *dest,uLongf *destLen,
sl@0
    80
	const Bytef *source, uLong sourceLen);
sl@0
    81
typedef int (Z_CALLCONV *inflateEnd_ft)(z_streamp strm);
sl@0
    82
typedef int (Z_CALLCONV *inflate_ft)(z_streamp strm, int flush);
sl@0
    83
typedef int (Z_CALLCONV *inflateInit__ft)(z_streamp strm,
sl@0
    84
	const char * version, int stream_size);
sl@0
    85
typedef int (Z_CALLCONV *deflateEnd_ft)(z_streamp strm);
sl@0
    86
typedef int (Z_CALLCONV *deflate_ft)(z_streamp strm, int flush);
sl@0
    87
typedef int (Z_CALLCONV *deflateInit__ft)(z_streamp strm, int level,
sl@0
    88
	const char * version, int stream_size);
sl@0
    89
sl@0
    90
/* What an "implementation of ex_data functionality" looks like */
sl@0
    91
struct st_CRYPTO_EX_DATA_IMPL
sl@0
    92
	{
sl@0
    93
	/*********************/
sl@0
    94
	/* GLOBAL OPERATIONS */
sl@0
    95
	/* Return a new class index */
sl@0
    96
	int (*cb_new_class)(void);
sl@0
    97
	/* Cleanup all state used by the implementation */
sl@0
    98
	void (*cb_cleanup)(void);
sl@0
    99
	/************************/
sl@0
   100
	/* PER-CLASS OPERATIONS */
sl@0
   101
	/* Get a new method index within a class */
sl@0
   102
	int (*cb_get_new_index)(int class_index, long argl, void *argp,
sl@0
   103
			CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
sl@0
   104
			CRYPTO_EX_free *free_func);
sl@0
   105
	/* Initialise a new CRYPTO_EX_DATA of a given class */
sl@0
   106
	int (*cb_new_ex_data)(int class_index, void *obj,
sl@0
   107
			CRYPTO_EX_DATA *ad);
sl@0
   108
	/* Duplicate a CRYPTO_EX_DATA of a given class onto a copy */
sl@0
   109
	int (*cb_dup_ex_data)(int class_index, CRYPTO_EX_DATA *to,
sl@0
   110
			CRYPTO_EX_DATA *from);
sl@0
   111
	/* Cleanup a CRYPTO_EX_DATA of a given class */
sl@0
   112
	void (*cb_free_ex_data)(int class_index, void *obj,
sl@0
   113
			CRYPTO_EX_DATA *ad);
sl@0
   114
	};
sl@0
   115
sl@0
   116
struct st_ERR_FNS
sl@0
   117
	{
sl@0
   118
	/* Works on the "error_hash" string table */
sl@0
   119
	LHASH *(*cb_err_get)(int create);
sl@0
   120
	void (*cb_err_del)(void);
sl@0
   121
	ERR_STRING_DATA *(*cb_err_get_item)(const ERR_STRING_DATA *);
sl@0
   122
	ERR_STRING_DATA *(*cb_err_set_item)(ERR_STRING_DATA *);
sl@0
   123
	ERR_STRING_DATA *(*cb_err_del_item)(ERR_STRING_DATA *);
sl@0
   124
	/* Works on the "thread_hash" error-state table */
sl@0
   125
	LHASH *(*cb_thread_get)(int create);
sl@0
   126
	void (*cb_thread_release)(LHASH **hash);
sl@0
   127
	ERR_STATE *(*cb_thread_get_item)(const ERR_STATE *);
sl@0
   128
	ERR_STATE *(*cb_thread_set_item)(ERR_STATE *);
sl@0
   129
	void (*cb_thread_del_item)(const ERR_STATE *);
sl@0
   130
	/* Returns the next available error "library" numbers */
sl@0
   131
	int (*cb_get_next_lib)(void);
sl@0
   132
	};
sl@0
   133
sl@0
   134
sl@0
   135
#ifdef __cplusplus
sl@0
   136
extern "C" 
sl@0
   137
{
sl@0
   138
#endif
sl@0
   139
sl@0
   140
typedef struct
sl@0
   141
{
sl@0
   142
	
sl@0
   143
	
sl@0
   144
	VARIABLE_DECL(tntmp,s,asn1_gen,struct tag_name_st*)
sl@0
   145
    VARIABLE_DECL(ia5string_meth,s,a_meth,ASN1_METHOD)
sl@0
   146
    VARIABLE_DECL(bit_string_meth,s,a_meth,ASN1_METHOD)
sl@0
   147
    VARIABLE_DECL(stable,s,a_strnid,STACK_OF(ASN1_STRING_TABLE)*)
sl@0
   148
    VARIABLE_DECL(global_mask,s,a_strnid,unsigned long)
sl@0
   149
    VARIABLE_DECL(app_locks,s,cryptlib,STACK *)
sl@0
   150
    VARIABLE_DECL(dyn_locks,s,cryptlib,STACK_OF(CRYPTO_dynlock)*)
sl@0
   151
    VARIABLE_DECL(allow_customize,s,mem,int)
sl@0
   152
    VARIABLE_DECL(allow_customize_debug,s,mem,int)
sl@0
   153
    VARIABLE_DECL(mh_mode,s,mem_dbg,int)
sl@0
   154
    VARIABLE_DECL(order,s,mem_dbg,unsigned long)
sl@0
   155
    VARIABLE_DECL(mh,s,mem_dbg,LHASH *)
sl@0
   156
    VARIABLE_DECL(amih,s,mem_dbg,LHASH *)
sl@0
   157
    VARIABLE_DECL(options,s,mem_dbg,unsigned long)
sl@0
   158
    VARIABLE_DECL(num_disable,s,mem_dbg,unsigned int)
sl@0
   159
    VARIABLE_DECL(disabling_thread,s,mem_dbg,unsigned long)
sl@0
   160
    VARIABLE_DECL(impl,s,ex_data,CRYPTO_EX_DATA_IMPL *)
sl@0
   161
    VARIABLE_DECL(ex_class,s,ex_data,int)
sl@0
   162
    VARIABLE_DECL(ex_data,s,ex_data,LHASH *)
sl@0
   163
    VARIABLE_DECL(init,s,bn_lib,int)
sl@0
   164
    VARIABLE_DECL_ARRAY(data,s,bn_lib,char,16)
sl@0
   165
    VARIABLE_DECL(data_one,s,bn_lib,BN_ULONG)
sl@0
   166
    VARIABLE_DECL(const_one,s,bn_lib,BIGNUM)
sl@0
   167
    VARIABLE_DECL_ARRAY(_256_data,s,bn_nist,BN_ULONG,BN_NIST_256_TOP*6)
sl@0
   168
    VARIABLE_DECL(_is_set_256_data,s,bn_nist,int)
sl@0
   169
    VARIABLE_DECL_ARRAY(_384_data,s,bn_nist,BN_ULONG,BN_NIST_384_TOP*8)
sl@0
   170
    VARIABLE_DECL(_is_set_384_data,s,bn_nist,int)
sl@0
   171
    VARIABLE_DECL(zlib_stateful_ex_idx,s,c_zlib,int)
sl@0
   172
    VARIABLE_DECL(p_compress,s,c_zlib,compress_ft)
sl@0
   173
    VARIABLE_DECL(p_inflateEnd,s,c_zlib,inflateEnd_ft)
sl@0
   174
    VARIABLE_DECL(p_inflate,s,c_zlib,inflate_ft)
sl@0
   175
    VARIABLE_DECL(p_inflateInit_,s,c_zlib,inflateInit__ft)
sl@0
   176
    VARIABLE_DECL(p_deflateEnd,s,c_zlib,deflateEnd_ft)
sl@0
   177
    VARIABLE_DECL(p_deflate,s,c_zlib,deflate_ft)
sl@0
   178
    VARIABLE_DECL(p_deflateInit_,s,c_zlib,deflateInit__ft)
sl@0
   179
    VARIABLE_DECL(zlib_loaded,s,c_zlib,int)
sl@0
   180
    VARIABLE_DECL(zlib_dso,s,c_zlib,DSO *)
sl@0
   181
 	  VARIABLE_DECL(supported_modules,s,conf_mod,STACK_OF(CONF_MODULE)*)
sl@0
   182
    VARIABLE_DECL(initialized_modules,s,conf_mod,STACK_OF(CONF_MODULE)*)
sl@0
   183
    VARIABLE_DECL(openssl_configured,s,conf_sap,int)
sl@0
   184
    VARIABLE_DECL(init,s,ecb_enc,int)
sl@0
   185
    VARIABLE_DECL_ARRAY(buf,s,ecb_enc,char,32)
sl@0
   186
    VARIABLE_DECL(net,s,enc_read,unsigned char *)
sl@0
   187
    VARIABLE_DECL(unnet,s,enc_read,unsigned char *)
sl@0
   188
    VARIABLE_DECL(unnet_start,s,enc_read,int)
sl@0
   189
    VARIABLE_DECL(unnet_left,s,enc_read,int)
sl@0
   190
    VARIABLE_DECL(tmpbuf,s,enc_read,unsigned char *)
sl@0
   191
    VARIABLE_DECL(outbuf,s,enc_write,unsigned char *)
sl@0
   192
    VARIABLE_DECL(start,s,enc_write,int)
sl@0
   193
    VARIABLE_DECL_ARRAY(weak_keys,s,set_key_c,DES_cblock,16)
sl@0
   194
    VARIABLE_DECL(cleanup_stack,s,eng_lib,STACK_OF(ENGINE_CLEANUP_ITEM) *)
sl@0
   195
    VARIABLE_DECL(internal_static_hack,s,eng_lib,int)
sl@0
   196
    VARIABLE_DECL(engine_list_head,s,eng_list,ENGINE *)
sl@0
   197
    VARIABLE_DECL(engine_list_tail,s,eng_list,ENGINE *)
sl@0
   198
    VARIABLE_DECL(table_flags,s,eng_table,unsigned int)
sl@0
   199
    VARIABLE_DECL(initialized_engines,s,eng_cnf,STACK_OF(ENGINE) *)
sl@0
   200
    VARIABLE_DECL(dynamic_ex_data_idx,s,eng_dyn,int)
sl@0
   201
    VARIABLE_DECL(rsa_table,s,tb_rsa,ENGINE_TABLE *)
sl@0
   202
    VARIABLE_DECL(dsa_table,s,tb_dsa,ENGINE_TABLE *)
sl@0
   203
    VARIABLE_DECL(ecdh_table,s,tb_ecdh,ENGINE_TABLE *)
sl@0
   204
    VARIABLE_DECL(ecdsa_table,s,tb_ecdsa,ENGINE_TABLE *)
sl@0
   205
    VARIABLE_DECL(rand_table,s,tb_rand,ENGINE_TABLE *)
sl@0
   206
    VARIABLE_DECL(digest_table,s,tb_digest,ENGINE_TABLE *)
sl@0
   207
    VARIABLE_DECL(store_table,s,tb_store,ENGINE_TABLE *)
sl@0
   208
    VARIABLE_DECL(dh_table,s,tb_dh,ENGINE_TABLE *)
sl@0
   209
    VARIABLE_DECL(cipher_table,s,tb_cipher,ENGINE_TABLE *)
sl@0
   210
    VARIABLE_DECL(err_fns,s,err,const ERR_FNS *)
sl@0
   211
    VARIABLE_DECL(int_error_hash,s,err,LHASH *)
sl@0
   212
    VARIABLE_DECL(int_thread_hash,s,err,LHASH *)
sl@0
   213
    VARIABLE_DECL(int_thread_hash_references,s,err,int)
sl@0
   214
    VARIABLE_DECL(int_err_library_number,s,err,int) 
sl@0
   215
    VARIABLE_DECL(init,s,err,int)
sl@0
   216
    VARIABLE_DECL(pbe_algs,s,evp_pbe,STACK *) 
sl@0
   217
    VARIABLE_DECL(names_lh,s,o_names,LHASH *)
sl@0
   218
    VARIABLE_DECL(names_type_num,s,o_names,int)
sl@0
   219
    VARIABLE_DECL(name_funcs_stack,s,o_names,STACK_OF(NAME_FUNCS)*)
sl@0
   220
    VARIABLE_DECL(free_type,s,o_names,int)     
sl@0
   221
    VARIABLE_DECL(new_nid,s,obj_dat,int)
sl@0
   222
    VARIABLE_DECL(added,s,obj_dat,LHASH *)
sl@0
   223
    VARIABLE_DECL(state_num,s,md_rand,int)
sl@0
   224
    VARIABLE_DECL(state_index,s,md_rand,int)
sl@0
   225
    VARIABLE_DECL_ARRAY(state,s,md_rand,unsigned char,1023+MD_DIGEST_LENGTH)
sl@0
   226
    VARIABLE_DECL_ARRAY(md,s,md_rand,unsigned char,MD_DIGEST_LENGTH)
sl@0
   227
    VARIABLE_DECL_ARRAY(md_count,s,md_rand,unsigned char,2)
sl@0
   228
    VARIABLE_DECL(entropy,s,md_rand,double)
sl@0
   229
    VARIABLE_DECL(initialized,s,md_rand,int)
sl@0
   230
    VARIABLE_DECL(crypto_lock_rand,s,md_rand,unsigned int)
sl@0
   231
    VARIABLE_DECL(locking_thread,s,md_rand,unsigned long)
sl@0
   232
    VARIABLE_DECL(default_RAND_meth,s,rand_lib,const RAND_METHOD *)
sl@0
   233
    VARIABLE_DECL(tty_in,s,ui_openssl,FILE *)
sl@0
   234
    VARIABLE_DECL(tty_out,s,ui_openssl,FILE *)
sl@0
   235
    VARIABLE_DECL(is_a_tty,s,ui_openssl,int)
sl@0
   236
    VARIABLE_DECL(ext_nids,s,x509_req,int*)
sl@0
   237
    VARIABLE_DECL_ARRAY(ext_nid_list,s,x509_req,int,3)
sl@0
   238
    VARIABLE_DECL(trtable,s,x509_trs,STACK_OF(X509_TRUST) *)
sl@0
   239
    VARIABLE_DECL(param_table,s,x509_vpm,STACK_OF(X509_VERIFY_PARAM) *)
sl@0
   240
    VARIABLE_DECL(ext_list,s,v3_lib,STACK_OF(X509V3_EXT_METHOD) *)
sl@0
   241
    VARIABLE_DECL(xptable,s,v3_purp,STACK_OF(X509_PURPOSE)*)
sl@0
   242
    VARIABLE_DECL(from,s,b_sock,struct sockaddr_in)    
sl@0
   243
    VARIABLE_DECL_ARRAY(buff,s,fcrypt,char,14)
sl@0
   244
    VARIABLE_DECL_ARRAY(buf,s,err,char,256)
sl@0
   245
    VARIABLE_DECL(fallback,s,err,ERR_STATE)
sl@0
   246
    VARIABLE_DECL_ARRAY(SYS_str_reasons,s,err,ERR_STRING_DATA,128)//NUM_SYS_STR_REASONS + 1
sl@0
   247
    VARIABLE_DECL_ARRAY(prompt_string,s,evp_key,char,80)
sl@0
   248
    VARIABLE_DECL_ARRAY(m,s,hmac,unsigned char,EVP_MAX_MD_SIZE)
sl@0
   249
    VARIABLE_DECL_ARRAY(m,s,md2,unsigned char,EVP_MAX_MD_SIZE)
sl@0
   250
    VARIABLE_DECL_ARRAY(m,s,md5,unsigned char,EVP_MAX_MD_SIZE)
sl@0
   251
    VARIABLE_DECL_ARRAY(m,s,sha1_one,unsigned char,SHA_DIGEST_LENGTH)
sl@0
   252
    VARIABLE_DECL_ARRAY(m,s,sha_one,unsigned char,EVP_MAX_MD_SIZE)
sl@0
   253
    VARIABLE_DECL_ARRAY(buf,s,x509_txt,char,100)
sl@0
   254
    VARIABLE_DECL_ARRAY(ASN1_str_functs,s,asn1_err, ERR_STRING_DATA,108)
sl@0
   255
    VARIABLE_DECL_ARRAY(ASN1_str_reasons,s,asn1_err,ERR_STRING_DATA,99)
sl@0
   256
    VARIABLE_DECL_ARRAY(CRYPTO_str_functs,s,cpt_err,ERR_STRING_DATA,10)
sl@0
   257
    VARIABLE_DECL_ARRAY(CRYPTO_str_reasons,s,cpt_err,ERR_STRING_DATA,2)
sl@0
   258
    VARIABLE_DECL_ARRAY(BIO_str_functs,s,bio_err,ERR_STRING_DATA,33)
sl@0
   259
    VARIABLE_DECL_ARRAY(BIO_str_reasons,s,bio_err,ERR_STRING_DATA,30)
sl@0
   260
    VARIABLE_DECL_ARRAY(BN_str_functs,s,bn_err,ERR_STRING_DATA,39)
sl@0
   261
    VARIABLE_DECL_ARRAY(BN_str_reasons,s,bn_err,ERR_STRING_DATA,18)
sl@0
   262
    VARIABLE_DECL_ARRAY(BUF_str_functs,s,buf_err,ERR_STRING_DATA,7)
sl@0
   263
    VARIABLE_DECL_ARRAY(BUF_str_reasons,s,buf_err,ERR_STRING_DATA,1)
sl@0
   264
    VARIABLE_DECL_ARRAY(COMP_str_functs,s,comp_err,ERR_STRING_DATA,1)
sl@0
   265
    VARIABLE_DECL_ARRAY(COMP_str_reasons,s,comp_err,ERR_STRING_DATA,1)
sl@0
   266
    VARIABLE_DECL_ARRAY(CONF_str_functs,s,conf_err,ERR_STRING_DATA,22)
sl@0
   267
    VARIABLE_DECL_ARRAY(CONF_str_reasons,s,conf_err,ERR_STRING_DATA,16)
sl@0
   268
    VARIABLE_DECL_ARRAY(DH_str_functs,s,dh_err,ERR_STRING_DATA,8)
sl@0
   269
    VARIABLE_DECL_ARRAY(DH_str_reasons,s,dh_err,ERR_STRING_DATA,4)
sl@0
   270
    VARIABLE_DECL_ARRAY(DSA_str_functs,s,dsa_err,ERR_STRING_DATA,15)
sl@0
   271
    VARIABLE_DECL_ARRAY(DSA_str_reasons,s,dsa_err,ERR_STRING_DATA,3)
sl@0
   272
    VARIABLE_DECL_ARRAY(DSO_str_functs,s,dso_err,ERR_STRING_DATA,38)
sl@0
   273
    VARIABLE_DECL_ARRAY(DSO_str_reasons,s,dso_err,ERR_STRING_DATA,18)
sl@0
   274
    VARIABLE_DECL_ARRAY(ENGINE_str_functs,s,eng_err,ERR_STRING_DATA,37)
sl@0
   275
    VARIABLE_DECL_ARRAY(ENGINE_str_reasons,s,eng_err,ERR_STRING_DATA,40)
sl@0
   276
    VARIABLE_DECL_ARRAY(ERR_str_libraries,s,err_err,ERR_STRING_DATA,25)
sl@0
   277
    VARIABLE_DECL_ARRAY(ERR_str_functs,s,err_err,ERR_STRING_DATA,11)
sl@0
   278
    VARIABLE_DECL_ARRAY(ERR_str_reasons,s,err_err,ERR_STRING_DATA,36)
sl@0
   279
    VARIABLE_DECL_ARRAY(EVP_str_functs,s,evp_err,ERR_STRING_DATA,36)
sl@0
   280
    VARIABLE_DECL_ARRAY(EVP_str_reasons,s,evp_err,ERR_STRING_DATA,45)
sl@0
   281
    VARIABLE_DECL_ARRAY(OBJ_str_functs,s,obj_err,ERR_STRING_DATA,8)
sl@0
   282
    VARIABLE_DECL_ARRAY(OBJ_str_reasons,s,obj_err,ERR_STRING_DATA,3)
sl@0
   283
    VARIABLE_DECL_ARRAY(OCSP_str_functs,s,ocsp_err,ERR_STRING_DATA,18)
sl@0
   284
    VARIABLE_DECL_ARRAY(OCSP_str_reasons,s,ocsp_err,ERR_STRING_DATA,31)
sl@0
   285
    VARIABLE_DECL_ARRAY(PEM_str_functs,s,pem_err,ERR_STRING_DATA,27)
sl@0
   286
    VARIABLE_DECL_ARRAY(PEM_str_reasons,s,pem_err,ERR_STRING_DATA,17)
sl@0
   287
    VARIABLE_DECL_ARRAY(PKCS7_str_functs,s,pkcs7_err,ERR_STRING_DATA,29)
sl@0
   288
    VARIABLE_DECL_ARRAY(PKCS7_str_reasons,s,pkcs7_err,ERR_STRING_DATA,47)
sl@0
   289
    VARIABLE_DECL_ARRAY(PKCS12_str_functs,s,pkcs12_err,ERR_STRING_DATA,30)
sl@0
   290
    VARIABLE_DECL_ARRAY(PKCS12_str_reasons,s,pkcs12_err,ERR_STRING_DATA,23)
sl@0
   291
    VARIABLE_DECL_ARRAY(RAND_str_functs,s,rand_err,ERR_STRING_DATA,3)
sl@0
   292
    VARIABLE_DECL_ARRAY(RAND_str_reasons,s,rand_err,ERR_STRING_DATA,2)
sl@0
   293
    VARIABLE_DECL_ARRAY(RSA_str_functs,s,rsa_err,ERR_STRING_DATA,38)
sl@0
   294
    VARIABLE_DECL_ARRAY(RSA_str_reasons,s,rsa_err,ERR_STRING_DATA,41)
sl@0
   295
    VARIABLE_DECL_ARRAY(UI_str_functs,s,ui_err,ERR_STRING_DATA,13)
sl@0
   296
    VARIABLE_DECL_ARRAY(UI_str_reasons,s,ui_err,ERR_STRING_DATA,8)
sl@0
   297
    VARIABLE_DECL_ARRAY(X509_str_functs,s,x509_err,ERR_STRING_DATA,46)
sl@0
   298
    VARIABLE_DECL_ARRAY(X509_str_reasons,s,x509_err,ERR_STRING_DATA,24)
sl@0
   299
    VARIABLE_DECL_ARRAY(X509V3_str_functs,s,x509v3_err,ERR_STRING_DATA,57)
sl@0
   300
    VARIABLE_DECL_ARRAY(X509V3_str_reasons,s,x509v3_err,ERR_STRING_DATA,61)
sl@0
   301
    VARIABLE_DECL(default_CONF_method,s,conf_lib,const CONF_METHOD *)
sl@0
   302
    VARIABLE_DECL(default_DH_method,s,dh_lib,const DH_METHOD *)
sl@0
   303
    VARIABLE_DECL(default_DSA_method,s,dsa_lib,const DSA_METHOD *)
sl@0
   304
    VARIABLE_DECL(default_DSO_meth,s,dso_lib,DSO_METHOD *)
sl@0
   305
    VARIABLE_DECL(default_RSA_meth,s,rsa_lib,const RSA_METHOD *)
sl@0
   306
    VARIABLE_DECL(default_UI_meth,s,ui_lib,const UI_METHOD *)
sl@0
   307
    
sl@0
   308
    void *(*malloc_func)(size_t);
sl@0
   309
    void *(*malloc_ex_func)(size_t, const char *file, int line);
sl@0
   310
    void *(*realloc_func)(void *, size_t);
sl@0
   311
    void *(*realloc_ex_func)(void *, size_t, const char *file, int line);
sl@0
   312
    void (*free_func_openssl)(void *);
sl@0
   313
    void *(*malloc_locked_func)(size_t);
sl@0
   314
    void *(*malloc_locked_ex_func)(size_t, const char *file, int line);
sl@0
   315
    void (*free_locked_func)(void *);
sl@0
   316
    void (*malloc_debug_func)(void *,int,const char *,int,int);
sl@0
   317
	  void (*realloc_debug_func)(void *,void *,int,const char *,int,int);
sl@0
   318
    void (*free_debug_func)(void *,int);
sl@0
   319
    void (*set_debug_options_func)(long);
sl@0
   320
    long (*get_debug_options_func)(void);
sl@0
   321
    void (MS_FAR *locking_callback)(int mode,int type,
sl@0
   322
    const char *file,int line);
sl@0
   323
    int (MS_FAR *add_lock_callback)(int *pointer,int amount,
sl@0
   324
   	int type,const char *file,int line);
sl@0
   325
    unsigned long (MS_FAR *id_callback)(void);
sl@0
   326
    struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
sl@0
   327
	  (const char *file,int line);
sl@0
   328
    void (MS_FAR *dynlock_lock_callback)(int mode,
sl@0
   329
	  struct CRYPTO_dynlock_value *l, const char *file,int line);
sl@0
   330
    void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
sl@0
   331
	  const char *file,int line);
sl@0
   332
    
sl@0
   333
    /*START-static structs*/
sl@0
   334
   	VARIABLE_DECL(impl_default,s,ex_data,CRYPTO_EX_DATA_IMPL)
sl@0
   335
   	VARIABLE_DECL(mem_method,s,bss_mem,BIO_METHOD)
sl@0
   336
   	VARIABLE_DECL(null_method,s,bss_null,BIO_METHOD)
sl@0
   337
    VARIABLE_DECL(methods_fdp,s,bss_fd,BIO_METHOD)
sl@0
   338
	  VARIABLE_DECL(methods_sockp,s,bss_sock,BIO_METHOD)
sl@0
   339
	  VARIABLE_DECL(methods_filep,s,bss_file,BIO_METHOD)
sl@0
   340
	  VARIABLE_DECL(methods_dgramp,s,bss_dgram,BIO_METHOD)
sl@0
   341
	  VARIABLE_DECL(methods_connectp,s,bss_conn,BIO_METHOD)
sl@0
   342
	  VARIABLE_DECL(methods_biop,s,bss_bio,BIO_METHOD)
sl@0
   343
	  VARIABLE_DECL(methods_acceptp,s,bss_acpt,BIO_METHOD)
sl@0
   344
	  VARIABLE_DECL(rle_method,s,c_rle,COMP_METHOD)
sl@0
   345
	  VARIABLE_DECL(zlib_method_nozlib,s,c_zlib,COMP_METHOD)
sl@0
   346
#ifdef ZLIB	  
sl@0
   347
    VARIABLE_DECL(zlib_stateful_method,s,c_zlib,COMP_METHOD)
sl@0
   348
#endif    
sl@0
   349
    VARIABLE_DECL(default_method,s,conf_def,CONF_METHOD)
sl@0
   350
    VARIABLE_DECL(WIN32_method,s,conf_def,CONF_METHOD)
sl@0
   351
    VARIABLE_DECL(dh_ossl,s,dh_key,DH_METHOD)
sl@0
   352
    VARIABLE_DECL(openssl_dsa_meth,s,dsa_ossl,DSA_METHOD)
sl@0
   353
    //VARIABLE_DECL(dso_meth_dl,s,dso_dl,DSO_METHOD)
sl@0
   354
    VARIABLE_DECL(dso_meth_dlfcn,s,dso_dlfcn,DSO_METHOD)
sl@0
   355
    VARIABLE_DECL(dso_meth_null,s,dso_null,DSO_METHOD)
sl@0
   356
    VARIABLE_DECL(methods_md,s,bio_md,BIO_METHOD)
sl@0
   357
    VARIABLE_DECL(methods_b64,s,bio_b64,BIO_METHOD)
sl@0
   358
    VARIABLE_DECL(methods_enc,s,bio_enc,BIO_METHOD)
sl@0
   359
    VARIABLE_DECL(methods_ok,s,bio_ok,BIO_METHOD)
sl@0
   360
    VARIABLE_DECL(rsa_pkcs1_eay_meth,s,rsa_eay,RSA_METHOD )
sl@0
   361
    VARIABLE_DECL(store_memory,s,str_mem,STORE_METHOD)
sl@0
   362
    VARIABLE_DECL(ui_openssl,s,ui_openssl,UI_METHOD)
sl@0
   363
    VARIABLE_DECL(nconf_method,s,v3_conf,X509V3_CONF_METHOD)
sl@0
   364
    VARIABLE_DECL(conf_lhash_method,s,v3_conf,X509V3_CONF_METHOD)
sl@0
   365
    VARIABLE_DECL(meth,s,x_x509,ASN1_METHOD)
sl@0
   366
    VARIABLE_DECL(method,s,rsa_asn1,ASN1_METHOD)
sl@0
   367
    VARIABLE_DECL(stirred_pool,s,md_rand,volatile int)
sl@0
   368
 
sl@0
   369
    char strerror_tab[127][32];
sl@0
   370
    int _shadow_DES_rw_mode;
sl@0
   371
    int _shadow_DES_check_key;
sl@0
   372
sl@0
   373
    /*END-static structs*/   
sl@0
   374
    /*START-global vars*/
sl@0
   375
    VARIABLE_DECL(cleanse_ctr,g,mem_clr,unsigned char)
sl@0
   376
    VARIABLE_DECL(rand_ssleay_meth,g,md_rand, RAND_METHOD)
sl@0
   377
    VARIABLE_DECL(x509_file_lookup,g,by_file,X509_LOOKUP_METHOD)
sl@0
   378
    VARIABLE_DECL(x509_dir_lookup,g,by_dir,X509_LOOKUP_METHOD)
sl@0
   379
   
sl@0
   380
    /*END-global vars*/
sl@0
   381
 
sl@0
   382
    }libcrypto_global_struct;
sl@0
   383
#ifdef __cplusplus
sl@0
   384
}
sl@0
   385
#endif
sl@0
   386
#ifdef __cplusplus
sl@0
   387
extern "C" 
sl@0
   388
{
sl@0
   389
#endif
sl@0
   390
libcrypto_global_struct * libcrypto_ImpurePtr();
sl@0
   391
int libcrypto_Init(libcrypto_global_struct *);
sl@0
   392
#ifdef __cplusplus
sl@0
   393
}
sl@0
   394
#endif
sl@0
   395
sl@0
   396
#endif /* EMULATOR */
sl@0
   397
#endif //_LIBCRYPTO_WSD_H