Die earlier if we have no hash function.
authorBen Laurie <ben@openssl.org>
Mon, 29 Dec 2008 11:46:44 +0000 (11:46 +0000)
committerBen Laurie <ben@openssl.org>
Mon, 29 Dec 2008 11:46:44 +0000 (11:46 +0000)
ssl/s3_enc.c

index 8e484d3b0c7e2835f5d33883a4042efd38522df1..701ac571798557767d2d1dba7fd92993869c9f5e 100644 (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;