Die earlier if we have no hash function.

This commit is contained in:
Ben Laurie 2008-12-29 11:46:44 +00:00
parent 2d1cbc85c8
commit 0e941da6fa

View file

@ -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;