diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-01-23 23:41:49 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-01-23 23:41:49 +0000 |
commit | dd9d233e2aa493fa1398b527afbf6aa5cdb23f23 (patch) | |
tree | 7606ef123dde3077e09da458c3a41b1a02dda46e | |
parent | dd8dec69b825c9fdafc26a200961702d850496b5 (diff) |
Tidy up CRYPTO_EX_DATA structures.
39 files changed, 306 insertions, 245 deletions
@@ -4,6 +4,10 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 1999] + *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes + used (char *) instead of (void *) and had casts all over the place. + [Steve Henson] + *) Make BN_generate_prime() return NULL on error if ret!=NULL. [Ulf Möller] diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl index ae4c45ee0c..1fb4112f1e 100644 --- a/crypto/Makefile.ssl +++ b/crypto/Makefile.ssl @@ -156,34 +156,40 @@ dclean: # DO NOT DELETE THIS LINE -- make depend depends on it. cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h -cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h +cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h +cpt_err.o: ../include/openssl/stack.h cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cryptlib.o: ../include/openssl/stack.h cryptlib.h +cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cryptlib.o: cryptlib.h cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cversion.o: ../include/openssl/stack.h buildinf.h cryptlib.h +cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cversion.o: buildinf.h cryptlib.h ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h -ex_data.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h +ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h +ex_data.o: ../include/openssl/stack.h cryptlib.h mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -mem.o: ../include/openssl/stack.h cryptlib.h +mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h cryptlib.h mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h -mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h +mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h +mem_dbg.o: ../include/openssl/stack.h cryptlib.h tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -tmdiff.o: ../include/openssl/stack.h ../include/openssl/tmdiff.h cryptlib.h +tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h +tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h diff --git a/crypto/asn1/Makefile.ssl b/crypto/asn1/Makefile.ssl index 74f057b5e3..b119a6aba3 100644 --- a/crypto/asn1/Makefile.ssl +++ b/crypto/asn1/Makefile.ssl @@ -853,7 +853,8 @@ t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h t_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h t_pkey.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h t_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h -t_pkey.o: ../../include/openssl/stack.h ../cryptlib.h +t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +t_pkey.o: ../cryptlib.h t_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h diff --git a/crypto/asn1/x_x509.c b/crypto/asn1/x_x509.c index ee3213045e..ee74bc9a2d 100644 --- a/crypto/asn1/x_x509.c +++ b/crypto/asn1/x_x509.c @@ -63,7 +63,7 @@ #include <openssl/x509.h> static int x509_meth_num = 0; -static STACK *x509_meth = NULL; +static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_meth = NULL; static ASN1_METHOD meth={ (int (*)()) i2d_X509, @@ -122,7 +122,7 @@ X509 *X509_new(void) M_ASN1_New(ret->cert_info,X509_CINF_new); M_ASN1_New(ret->sig_alg,X509_ALGOR_new); M_ASN1_New(ret->signature,M_ASN1_BIT_STRING_new); - CRYPTO_new_ex_data(x509_meth, (char *)ret, &ret->ex_data); + CRYPTO_new_ex_data(x509_meth, ret, &ret->ex_data); return(ret); M_ASN1_New_Error(ASN1_F_X509_NEW); } @@ -146,7 +146,7 @@ void X509_free(X509 *a) } #endif - CRYPTO_free_ex_data(x509_meth,(char *)a,&a->ex_data); + CRYPTO_free_ex_data(x509_meth,a,&a->ex_data); X509_CINF_free(a->cert_info); X509_ALGOR_free(a->sig_alg); M_ASN1_BIT_STRING_free(a->signature); @@ -156,20 +156,20 @@ void X509_free(X509 *a) Free((char *)a); } -int X509_get_ex_new_index(long argl, char *argp, int (*new_func)(), - int (*dup_func)(), void (*free_func)()) +int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { x509_meth_num++; return(CRYPTO_get_ex_new_index(x509_meth_num-1, &x509_meth,argl,argp,new_func,dup_func,free_func)); } -int X509_set_ex_data(X509 *r, int idx, char *arg) +int X509_set_ex_data(X509 *r, int idx, void *arg) { return(CRYPTO_set_ex_data(&r->ex_data,idx,arg)); } -char *X509_get_ex_data(X509 *r, int idx) +void *X509_get_ex_data(X509 *r, int idx) { return(CRYPTO_get_ex_data(&r->ex_data,idx)); } diff --git a/crypto/bio/Makefile.ssl b/crypto/bio/Makefile.ssl index f54c7ee1f0..b8ef2d9cae 100644 --- a/crypto/bio/Makefile.ssl +++ b/crypto/bio/Makefile.ssl @@ -90,17 +90,20 @@ b_dump.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h b_dump.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h b_dump.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -b_dump.o: ../../include/openssl/stack.h ../cryptlib.h +b_dump.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +b_dump.o: ../cryptlib.h b_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h b_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h b_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -b_print.o: ../../include/openssl/stack.h ../cryptlib.h +b_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +b_print.o: ../cryptlib.h b_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h b_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h b_sock.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -b_sock.o: ../../include/openssl/stack.h ../cryptlib.h +b_sock.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +b_sock.o: ../cryptlib.h bf_buff.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h bf_buff.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h @@ -151,60 +154,65 @@ bio_cb.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bio_cb.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bio_cb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -bio_cb.o: ../../include/openssl/stack.h ../cryptlib.h +bio_cb.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bio_cb.o: ../cryptlib.h bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h bio_err.o: ../../include/openssl/err.h ../../include/openssl/opensslv.h -bio_err.o: ../../include/openssl/stack.h +bio_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h bio_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bio_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bio_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -bio_lib.o: ../../include/openssl/stack.h ../cryptlib.h +bio_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bio_lib.o: ../cryptlib.h bss_acpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_acpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_acpt.o: ../../include/openssl/opensslconf.h -bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bss_acpt.o: ../cryptlib.h +bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_acpt.o: ../../include/openssl/stack.h ../cryptlib.h bss_bio.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h bss_bio.o: ../../include/openssl/err.h ../../include/openssl/opensslv.h -bss_bio.o: ../../include/openssl/stack.h +bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h bss_conn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_conn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_conn.o: ../../include/openssl/opensslconf.h -bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bss_conn.o: ../cryptlib.h +bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_conn.o: ../../include/openssl/stack.h ../cryptlib.h bss_fd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_fd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_fd.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -bss_fd.o: ../../include/openssl/stack.h ../cryptlib.h bss_sock.c +bss_fd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bss_fd.o: ../cryptlib.h bss_sock.c bss_file.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_file.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_file.o: ../../include/openssl/opensslconf.h -bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bss_file.o: ../cryptlib.h +bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_file.o: ../../include/openssl/stack.h ../cryptlib.h bss_log.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_log.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_log.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -bss_log.o: ../../include/openssl/stack.h ../cryptlib.h +bss_log.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bss_log.o: ../cryptlib.h bss_mem.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_mem.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_mem.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -bss_mem.o: ../../include/openssl/stack.h ../cryptlib.h +bss_mem.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bss_mem.o: ../cryptlib.h bss_null.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_null.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_null.o: ../../include/openssl/opensslconf.h -bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bss_null.o: ../cryptlib.h +bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_null.o: ../../include/openssl/stack.h ../cryptlib.h bss_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h bss_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h bss_sock.o: ../../include/openssl/opensslconf.h -bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bss_sock.o: ../cryptlib.h +bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_sock.o: ../../include/openssl/stack.h ../cryptlib.h diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h index 31264598d3..c81b64a0f3 100644 --- a/crypto/bio/bio.h +++ b/crypto/bio/bio.h @@ -334,7 +334,7 @@ typedef struct bio_f_buffer_ctx_struct #define BIO_C_RESET_READ_REQUEST 147 -#define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,(char *)arg) +#define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) #define BIO_get_app_data(s) BIO_get_ex_data(s,0) /* BIO_s_connect() and BIO_s_socks4a_connect() */ @@ -478,10 +478,10 @@ int BIO_ctrl_reset_read_request(BIO *b); /* These two aren't currently implemented */ /* int BIO_get_ex_num(BIO *bio); */ /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */ -int BIO_set_ex_data(BIO *bio,int idx,char *data); -char *BIO_get_ex_data(BIO *bio,int idx); -int BIO_get_ex_new_index(long argl, char *argp, int (*new_func)(), - int (*dup_func)(), void (*free_func)()); +int BIO_set_ex_data(BIO *bio,int idx,void *data); +void *BIO_get_ex_data(BIO *bio,int idx); +int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); unsigned long BIO_number_read(BIO *bio); unsigned long BIO_number_written(BIO *bio); diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c index ba374be13b..ae225da986 100644 --- a/crypto/bio/bio_lib.c +++ b/crypto/bio/bio_lib.c @@ -63,7 +63,7 @@ #include <openssl/bio.h> #include <openssl/stack.h> -static STACK *bio_meth=NULL; +static STACK_OF(CRYPTO_EX_DATA_FUNCS) *bio_meth=NULL; static int bio_meth_num=0; BIO *BIO_new(BIO_METHOD *method) @@ -100,7 +100,7 @@ int BIO_set(BIO *bio, BIO_METHOD *method) bio->references=1; bio->num_read=0L; bio->num_write=0L; - CRYPTO_new_ex_data(bio_meth,(char *)bio,&bio->ex_data); + CRYPTO_new_ex_data(bio_meth,bio,&bio->ex_data); if (method->create != NULL) if (!method->create(bio)) return(0); @@ -129,7 +129,7 @@ int BIO_free(BIO *a) ((i=(int)a->callback(a,BIO_CB_FREE,NULL,0,0L,1L)) <= 0)) return(i); - CRYPTO_free_ex_data(bio_meth,(char *)a,&a->ex_data); + CRYPTO_free_ex_data(bio_meth,a,&a->ex_data); if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); ret=a->method->destroy(a); @@ -476,20 +476,20 @@ void BIO_copy_next_retry(BIO *b) b->retry_reason=b->next_bio->retry_reason; } -int BIO_get_ex_new_index(long argl, char *argp, int (*new_func)(), - int (*dup_func)(), void (*free_func)()) +int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { bio_meth_num++; return(CRYPTO_get_ex_new_index(bio_meth_num-1,&bio_meth, argl,argp,new_func,dup_func,free_func)); } -int BIO_set_ex_data(BIO *bio, int idx, char *data) +int BIO_set_ex_data(BIO *bio, int idx, void *data) { return(CRYPTO_set_ex_data(&(bio->ex_data),idx,data)); } -char *BIO_get_ex_data(BIO *bio, int idx) +void *BIO_get_ex_data(BIO *bio, int idx) { return(CRYPTO_get_ex_data(&(bio->ex_data),idx)); } diff --git a/crypto/bn/Makefile.ssl b/crypto/bn/Makefile.ssl index 053b2f9b22..3427f9fa35 100644 --- a/crypto/bn/Makefile.ssl +++ b/crypto/bn/Makefile.ssl @@ -171,109 +171,111 @@ bn_add.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_add.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_add.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_add.o: ../cryptlib.h bn_lcl.h +bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_add.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_asm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_asm.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_asm.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_asm.o: ../cryptlib.h bn_lcl.h +bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_asm.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_blind.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_blind.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_blind.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_blind.o: ../cryptlib.h bn_lcl.h +bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_blind.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_div.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_div.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_div.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_div.o: ../cryptlib.h bn_lcl.h +bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_div.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_err.o: ../../include/openssl/bn.h ../../include/openssl/err.h bn_err.o: ../../include/openssl/opensslconf.h bn_exp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_exp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_exp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_exp.o: ../cryptlib.h bn_lcl.h +bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_exp2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_exp2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_exp2.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_exp2.o: ../cryptlib.h bn_lcl.h +bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp2.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_gcd.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_gcd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_gcd.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_gcd.o: ../cryptlib.h bn_lcl.h +bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_gcd.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_lib.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_lib.o: ../cryptlib.h bn_lcl.h +bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_lib.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_mont.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_mont.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_mont.o: ../cryptlib.h bn_lcl.h +bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mont.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_mpi.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_mpi.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_mpi.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_mpi.o: ../cryptlib.h bn_lcl.h +bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mpi.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_mul.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_mul.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_mul.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_mul.o: ../cryptlib.h bn_lcl.h +bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mul.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_prime.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_prime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_prime.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h -bn_prime.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_prime.h +bn_prime.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.h bn_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_print.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_print.o: ../cryptlib.h bn_lcl.h +bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_print.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_rand.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_rand.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_rand.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h -bn_rand.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h +bn_rand.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bn_rand.o: ../cryptlib.h bn_lcl.h bn_recp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_recp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_recp.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_recp.o: ../cryptlib.h bn_lcl.h +bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_recp.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_shift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_shift.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_shift.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_shift.o: ../cryptlib.h bn_lcl.h +bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_shift.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_sqr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_sqr.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_sqr.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_sqr.o: ../cryptlib.h bn_lcl.h +bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_sqr.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h bn_word.o: ../../include/openssl/bio.h ../../include/openssl/bn.h bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h bn_word.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h bn_word.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h -bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h -bn_word.o: ../cryptlib.h bn_lcl.h +bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_word.o: ../../include/openssl/stack.h ../cryptlib.h bn_lcl.h diff --git a/crypto/buffer/Makefile.ssl b/crypto/buffer/Makefile.ssl index b615c4c12d..bbcba1f5d1 100644 --- a/crypto/buffer/Makefile.ssl +++ b/crypto/buffer/Makefile.ssl @@ -83,4 +83,5 @@ buffer.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h buffer.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h buffer.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -buffer.o: ../../include/openssl/stack.h ../cryptlib.h +buffer.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +buffer.o: ../cryptlib.h diff --git a/crypto/crypto.h b/crypto/crypto.h index 9a7103112a..6334eab238 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -70,6 +70,7 @@ extern "C" { #endif #include <openssl/stack.h> +#include <openssl/safestack.h> #include <openssl/opensslv.h> #ifdef CHARSET_EBCDIC @@ -165,31 +166,36 @@ extern "C" { /* predec of the BIO type */ typedef struct bio_st BIO_dummy; - typedef struct crypto_ex_data_st { STACK *sk; int dummy; /* gcc is screwing up this data structure :-( */ } CRYPTO_EX_DATA; +/* Called when a new object is created */ +typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, + int idx, long argl, void *argp); +/* Called when an object is free()ed */ +typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, + int idx, long argl, void *argp); +/* Called when we need to dup an object */ +typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, + int idx, long argl, void *argp); + /* This stuff is basically class callback functions * The current classes are SSL_CTX, SSL, SSL_SESION, and a few more */ + typedef struct crypto_ex_data_func_st { long argl; /* Arbitary long */ - char *argp; /* Arbitary char * */ - /* Call |