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_enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ssl/s2_enc.c') diff --git a/ssl/s2_enc.c b/ssl/s2_enc.c index c05ce5ddc0..1aacae1380 100644 --- a/ssl/s2_enc.c +++ b/ssl/s2_enc.c @@ -169,6 +169,7 @@ void ssl2_mac(SSL *s, unsigned char *md, int send) l2n(seq,p); /* There has to be a MAC algorithm. */ + EVP_MD_CTX_init(&c); EVP_DigestInit(&c,s->read_hash); EVP_DigestUpdate(&c,sec, EVP_CIPHER_CTX_key_length(s->enc_read_ctx)); @@ -176,7 +177,7 @@ void ssl2_mac(SSL *s, unsigned char *md, int send) /* the above line also does the pad data */ EVP_DigestUpdate(&c,sequence,4); EVP_DigestFinal(&c,md,NULL); - /* some would say I should zero the md context */ + EVP_MD_CTX_cleanup(&c); } #else /* !OPENSSL_NO_SSL2 */ -- cgit v1.2.3