Skip to content

Commit

Permalink
P161732527 coverity cleanup (#1918)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
  • Loading branch information
samuel40791765 authored Oct 16, 2024
1 parent f146851 commit 7ff9840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/evp_extra/evp_extra_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions crypto/fipsmodule/evp/evp_ctx_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7ff9840

Please sign in to comment.