Skip to content

Commit

Permalink
Use malloc and add small test
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed May 13, 2024
1 parent e98a362 commit 4ba2b42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/pkcs8/pkcs12_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -674,3 +674,9 @@ TEST(PKCS12Test, CreateWithAlias) {
ASSERT_EQ(alias, std::string(reinterpret_cast<const char *>(parsed_alias),
static_cast<size_t>(alias_len)));
}

TEST(PKCS12Test, BasicAlloc) {
// Test direct allocation of |PKCS12_new| and |PKCS12_free|.
bssl::UniquePtr<PKCS12> p12(PKCS12_new());
ASSERT_TRUE(p12);
}

0 comments on commit 4ba2b42

Please sign in to comment.