From ed0139134e0f6557f413f7a69b37dd8875e2eacd Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Mon, 14 Oct 2024 23:43:13 +0000 Subject: [PATCH] P161732527 coverity cleanup --- crypto/evp_extra/evp_extra_test.cc | 2 ++ crypto/fipsmodule/evp/evp_ctx_test.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crypto/evp_extra/evp_extra_test.cc b/crypto/evp_extra/evp_extra_test.cc index 55027837762..5e16a782a8b 100644 --- a/crypto/evp_extra/evp_extra_test.cc +++ b/crypto/evp_extra/evp_extra_test.cc @@ -1817,7 +1817,9 @@ TEST(EVPExtraTest, DHParamgen) { ASSERT_TRUE(raw_pkey); const DH* dh = EVP_PKEY_get0_DH(pkey.get()); + ASSERT_TRUE(dh); const BIGNUM* p = DH_get0_p(dh); + ASSERT_TRUE(p); unsigned p_size = BN_num_bits(p); ASSERT_EQ(p_size, (unsigned)prime_len); } diff --git a/crypto/fipsmodule/evp/evp_ctx_test.cc b/crypto/fipsmodule/evp/evp_ctx_test.cc index 1889b5d56b1..96b2e4fe673 100644 --- a/crypto/fipsmodule/evp/evp_ctx_test.cc +++ b/crypto/fipsmodule/evp/evp_ctx_test.cc @@ -260,7 +260,9 @@ TEST_F(EvpPkeyCtxCtrlStrTest, DhParamGen) { ASSERT_TRUE(raw); const DH* dh = EVP_PKEY_get0_DH(pkey.get()); + ASSERT_TRUE(dh); const BIGNUM* p = DH_get0_p(dh); + ASSERT_TRUE(p); unsigned p_size = BN_num_bits(p); ASSERT_EQ(p_size, 256u); }