Skip to content

Commit

Permalink
add a quick test to see if rsa helpers handle ec certs
Browse files Browse the repository at this point in the history
LoadPublicKeyFromStringReferenceWithEcCert
  • Loading branch information
prince-chrismc committed Dec 10, 2023
1 parent 53fb5e1 commit 0415e75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/OpenSSLErrorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ TEST(OpenSSLErrorTest, LoadPublicKeyFromStringReference) {
ASSERT_TRUE(res);
}

TEST(OpenSSLErrorTest, LoadPublicKeyFromStringReferenceWithEcCert) {
auto res = jwt::helper::load_public_key_from_string(ecdsa256_pub_key, "");
ASSERT_TRUE(res);
}

TEST(OpenSSLErrorTest, LoadPublicKeyFromString) {
std::vector<multitest_entry> mapping{{&fail_BIO_new, 1, jwt::error::rsa_error::create_mem_bio_failed},
{&fail_BIO_write, 1, jwt::error::rsa_error::load_key_bio_write},
Expand Down

0 comments on commit 0415e75

Please sign in to comment.