summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-01-23 23:41:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-01-23 23:41:49 +0000
commitdd9d233e2aa493fa1398b527afbf6aa5cdb23f23 (patch)
tree7606ef123dde3077e09da458c3a41b1a02dda46e /crypto/dh
parentdd8dec69b825c9fdafc26a200961702d850496b5 (diff)
Tidy up CRYPTO_EX_DATA structures.
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/Makefile.ssl16
-rw-r--r--crypto/dh/dh.h8
-rw-r--r--crypto/dh/dh_lib.c14
3 files changed, 20 insertions, 18 deletions
diff --git a/crypto/dh/Makefile.ssl b/crypto/dh/Makefile.ssl
index cba2e1fcdb..4bc694e638 100644
--- a/crypto/dh/Makefile.ssl
+++ b/crypto/dh/Makefile.ssl
@@ -83,28 +83,30 @@ dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
dh_check.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_check.o: ../../include/openssl/opensslconf.h
-dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
-dh_check.o: ../cryptlib.h
+dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
+dh_check.o: ../../include/openssl/stack.h ../cryptlib.h
dh_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
dh_err.o: ../../include/openssl/dh.h ../../include/openssl/err.h
dh_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dh_err.o: ../../include/openssl/stack.h
+dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dh_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
dh_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dh_gen.o: ../../include/openssl/stack.h ../cryptlib.h
+dh_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+dh_gen.o: ../cryptlib.h
dh_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
dh_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dh_key.o: ../../include/openssl/rand.h ../../include/openssl/stack.h
-dh_key.o: ../cryptlib.h
+dh_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
+dh_key.o: ../../include/openssl/stack.h ../cryptlib.h
dh_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
-dh_lib.o: ../../include/openssl/stack.h ../cryptlib.h
+dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
+dh_lib.o: ../cryptlib.h
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index c96cdde968..c41ace5bea 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -155,10 +155,10 @@ DH *DH_new_method(DH_METHOD *meth);
DH * DH_new(void);
void DH_free(DH *dh);
int DH_size(DH *dh);
-int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(),
- int (*dup_func)(), void (*free_func)());
-int DH_set_ex_data(DH *d, int idx, char *arg);
-char *DH_get_ex_data(DH *d, int idx);
+int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
+ CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
+int DH_set_ex_data(DH *d, int idx, void *arg);
+void *DH_get_ex_data(DH *d, int idx);
DH * DH_generate_parameters(int prime_len,int generator,
void (*callback)(int,int,void *),void *cb_arg);
int DH_check(DH *dh,int *codes);
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c
index 48b9db2ac0..ebfbcb4347 100644
--- a/crypto/dh/dh_lib.c
+++ b/crypto/dh/dh_lib.c
@@ -65,7 +65,7 @@ const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT;
static DH_METHOD *default_DH_method;
static int dh_meth_num = 0;
-static STACK *dh_meth = NULL;
+static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
void DH_set_default_method(DH_METHOD *meth)
{
@@ -122,7 +122,7 @@ DH *DH_new_method(DH_METHOD *meth)
ret=NULL;
}
else
- CRYPTO_new_ex_data(dh_meth,(char *)ret,&ret->ex_data);
+ CRYPTO_new_ex_data(dh_meth,ret,&ret->ex_data);
return(ret);
}
@@ -143,7 +143,7 @@ void DH_free(DH *r)
}
#endif
- CRYPTO_free_ex_data(dh_meth, (char *)r, &r->ex_data);
+ CRYPTO_free_ex_data(dh_meth, r, &r->ex_data);
if(r->meth->finish) r->meth->finish(r);
@@ -154,20 +154,20 @@ void DH_free(DH *r)
Free(r);
}
-int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(),
- int (*dup_func)(), void (*free_func)())
+int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
+ CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
{
dh_meth_num++;
return(CRYPTO_get_ex_new_index(dh_meth_num-1,
&dh_meth,argl,argp,new_func,dup_func,free_func));
}
-int DH_set_ex_data(DH *d, int idx, char *arg)
+int DH_set_ex_data(DH *d, int idx, void *arg)
{
return(CRYPTO_set_ex_data(&d->ex_data,idx,arg));
}
-char *DH_get_ex_data(DH *d, int idx)
+void *DH_get_ex_data(DH *d, int idx)
{
return(CRYPTO_get_ex_data(&d->ex_data,idx));
}