diff options
author | Ben Laurie <ben@openssl.org> | 2001-07-30 23:57:25 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2001-07-30 23:57:25 +0000 |
commit | dbad169019598981174ff46c7a9bf58373b0e53a (patch) | |
tree | ce8ca1188d5614648f24b03967785543f1edc8f5 /crypto/evp/evp_key.c | |
parent | 3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff) |
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/evp/evp_key.c')
-rw-r--r-- | crypto/evp/evp_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c index 91738a273f..802e6de3b5 100644 --- a/crypto/evp/evp_key.c +++ b/crypto/evp/evp_key.c @@ -118,6 +118,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, if (data == NULL) return(nkey); + EVP_MD_CTX_init(&c); for (;;) { EVP_DigestInit(&c,md); @@ -161,7 +162,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, } if ((nkey == 0) && (niv == 0)) break; } - memset(&c,0,sizeof(c)); + EVP_MD_CTX_cleanup(&c); memset(&(md_buf[0]),0,EVP_MAX_MD_SIZE); return(type->key_len); } |