diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-01-28 01:35:31 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-01-28 01:35:31 +0000 |
commit | 90644dd74d5c5262831bb0be73e1226778099924 (patch) | |
tree | f07259a214d401c86ea41876e2cbe4eb762d394a /crypto | |
parent | 75b0edaafa5b4333c0e49831a0bce22339871ace (diff) | |
download | openssl-new-90644dd74d5c5262831bb0be73e1226778099924.tar.gz |
New -pkcs12 option to CA.pl.
Document CA.pl script.
Initialise and free up the extra DH fields
(nothing uses them yet though).
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dh/dh.h | 2 | ||||
-rw-r--r-- | crypto/dh/dh_lib.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h index c41ace5bea..c15b2ad483 100644 --- a/crypto/dh/dh.h +++ b/crypto/dh/dh.h @@ -106,7 +106,7 @@ struct dh_st /* Place holders if we want to do X9.42 DH */ BIGNUM *q; BIGNUM *j; - unsigned *seed; + unsigned char *seed; int seedlen; BIGNUM *counter; diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index ebfbcb4347..6c21463028 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -113,6 +113,11 @@ DH *DH_new_method(DH_METHOD *meth) ret->length=0; ret->pub_key=NULL; ret->priv_key=NULL; + ret->q=NULL; + ret->j=NULL; + ret->seed = NULL; + ret->seedlen = 0; + ret->counter = NULL; ret->method_mont_p=NULL; ret->references = 1; ret->flags=ret->meth->flags; @@ -149,6 +154,10 @@ void DH_free(DH *r) if (r->p != NULL) BN_clear_free(r->p); if (r->g != NULL) BN_clear_free(r->g); + if (r->q != NULL) BN_clear_free(r->q); + if (r->j != NULL) BN_clear_free(r->j); + if (r->seed) Free(r->seed); + if (r->counter != NULL) BN_clear_free(r->counter); if (r->pub_key != NULL) BN_clear_free(r->pub_key); if (r->priv_key != NULL) BN_clear_free(r->priv_key); Free(r); |