Skip to content

Commit

Permalink
Print Botan curve name in case of key load failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Jan 30, 2025
1 parent a9422b7 commit 64efd6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/crypto/ecdsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ load_public_key(rnp::botan::Pubkey &pubkey, const ec::Key &keydata)

bool res = !botan_pubkey_load_ecdsa(&pubkey.get(), px.get(), py.get(), curve->botan_name);
if (!res) {
RNP_LOG("failed to load ecdsa public key");
RNP_LOG("failed to load ecdsa %s public key", curve->botan_name);

Check warning on line 59 in src/lib/crypto/ecdsa.cpp

View check run for this annotation

Codecov / codecov/patch

src/lib/crypto/ecdsa.cpp#L59

Added line #L59 was not covered by tests
}
return res;
}
Expand All @@ -76,7 +76,7 @@ load_secret_key(rnp::botan::Privkey &seckey, const ec::Key &keydata)

bool res = !botan_privkey_load_ecdsa(&seckey.get(), x.get(), curve->botan_name);
if (!res) {
RNP_LOG("Can't load private key");
RNP_LOG("Can't load private %s key", curve->botan_name);

Check warning on line 79 in src/lib/crypto/ecdsa.cpp

View check run for this annotation

Codecov / codecov/patch

src/lib/crypto/ecdsa.cpp#L79

Added line #L79 was not covered by tests
}
return res;
}
Expand Down

0 comments on commit 64efd6a

Please sign in to comment.