Replace an ossl_assert() with an error check
authortb <tb@openbsd.org>
Tue, 9 Jul 2024 16:37:43 +0000 (16:37 +0000)
committertb <tb@openbsd.org>
Tue, 9 Jul 2024 16:37:43 +0000 (16:37 +0000)
lib/libcrypto/kdf/tls1_prf.c

index a03daf0..2483cf9 100644 (file)
@@ -201,8 +201,7 @@ static int tls1_prf_P_hash(const EVP_MD *md,
     size_t A1_len;
     int ret = 0;
 
-    chunk = EVP_MD_size(md);
-    if (!ossl_assert(chunk > 0))
+    if ((chunk = EVP_MD_size(md)) < 0)
         goto err;
 
     ctx = EVP_MD_CTX_new();