diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-22 12:33:42 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-22 14:00:43 +0100 |
commit | b77f3ed17134fe6bf99d143abb1aec3f2bfac555 (patch) | |
tree | a69d558f10df0648f0adcfb78a8b11933629879d /ssl/s3_cbc.c | |
parent | a89325e41f52b4a1f58202f6d8f5597105fc9f5a (diff) |
Convert existing usage of assert() to ossl_assert() in libssl
Provides consistent output and approach.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/s3_cbc.c')
-rw-r--r-- | ssl/s3_cbc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index f8d7aed3e1..0981360e0b 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -7,7 +7,6 @@ * https://www.openssl.org/source/license.html */ -#include <assert.h> #include "internal/constant_time_locl.h" #include "ssl_locl.h" @@ -229,15 +228,14 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, * ssl3_cbc_record_digest_supported should have been called first to * check that the hash function is supported. */ - assert(0); - if (md_out_size) + if (md_out_size != NULL) *md_out_size = 0; - return 0; + return ossl_assert(0); } - if (!ossl_assert(md_length_size <= MAX_HASH_BIT_COUNT_BYTES - && md_block_size <= MAX_HASH_BLOCK_SIZE - && md_size <= EVP_MAX_MD_SIZE)) + if (!ossl_assert(md_length_size <= MAX_HASH_BIT_COUNT_BYTES) + || !ossl_assert(md_block_size <= MAX_HASH_BLOCK_SIZE) + || !ossl_assert(md_size <= EVP_MAX_MD_SIZE)) return 0; header_length = 13; |