Skip to content

Commit

Permalink
add test for X509_REQ_check_private_key
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Jun 12, 2024
1 parent 1997f31 commit 8ce36af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypto/x509/x509_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,9 @@ TEST(X509Test, SignCSR) {
bssl::UniquePtr<EVP_PKEY> copy_pubkey(X509_REQ_get_pubkey(copy.get()));
ASSERT_TRUE(copy_pubkey);
EXPECT_EQ(1, EVP_PKEY_cmp(pkey.get(), copy_pubkey.get()));

// Check again specifically with |X509_REQ_check_private_key|.
EXPECT_TRUE(X509_REQ_check_private_key(csr.get(), pkey.get()));
}
}
}
Expand Down

0 comments on commit 8ce36af

Please sign in to comment.