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 /ssl/s2_lib.c | |
parent | 3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff) |
Really add the EVP and all of the DES changes.
Diffstat (limited to 'ssl/s2_lib.c')
-rw-r--r-- | ssl/s2_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index 40ca3779bf..9b40059cf1 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -62,6 +62,7 @@ #include <openssl/rsa.h> #include <openssl/objects.h> #include <openssl/evp.h> +#include <openssl/md5.h> static long ssl2_default_timeout(void ); const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT; @@ -423,7 +424,7 @@ void ssl2_generate_key_material(SSL *s) c = os_toascii['0']; /* Must be an ASCII '0', not EBCDIC '0', see SSLv2 docu */ #endif - + EVP_MD_CTX_init(&ctx); km=s->s2->key_material; for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH) { @@ -437,6 +438,7 @@ void ssl2_generate_key_material(SSL *s) EVP_DigestFinal(&ctx,km,NULL); km+=MD5_DIGEST_LENGTH; } + EVP_MD_CTX_cleanup(&ctx); } void ssl2_return_error(SSL *s, int err) |