From dbad169019598981174ff46c7a9bf58373b0e53a Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Mon, 30 Jul 2001 23:57:25 +0000 Subject: Really add the EVP and all of the DES changes. --- ssl/s2_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ssl/s2_lib.c') 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 #include #include +#include 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; is2->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) -- cgit v1.2.3