summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2008-12-29 11:46:44 +0000
committerBen Laurie <ben@openssl.org>2008-12-29 11:46:44 +0000
commit0e941da6fa83291c69516768c2b0af3944fe76b7 (patch)
treeb5ad30f1ef36e2d7ef597ff619a8630992db576d
parent2d1cbc85c83f92436e467b4f20fe86b35649a26d (diff)
Die earlier if we have no hash function.
-rw-r--r--ssl/s3_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 8e484d3b0c..701ac57179 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -709,6 +709,8 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send)
hash=ssl->read_hash;
}
+ /* If hash is NULL, then a crash will follow anyway */
+ OPENSSL_assert(hash);
md_size=EVP_MD_CTX_size(hash);
npad=(48/md_size)*md_size;