diff options
author | Ben Laurie <ben@openssl.org> | 2008-12-29 11:46:44 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-12-29 11:46:44 +0000 |
commit | 0e941da6fa83291c69516768c2b0af3944fe76b7 (patch) | |
tree | b5ad30f1ef36e2d7ef597ff619a8630992db576d /ssl/s3_enc.c | |
parent | 2d1cbc85c83f92436e467b4f20fe86b35649a26d (diff) |
Die earlier if we have no hash function.
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r-- | ssl/s3_enc.c | 2 |
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; |