summaryrefslogtreecommitdiffstats
path: root/ssl/s2_enc.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
committerBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
commitdbad169019598981174ff46c7a9bf58373b0e53a (patch)
treece8ca1188d5614648f24b03967785543f1edc8f5 /ssl/s2_enc.c
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
Really add the EVP and all of the DES changes.
Diffstat (limited to 'ssl/s2_enc.c')
-rw-r--r--ssl/s2_enc.c3
1 files changed, 2 insertions, 1 deletions
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 */