Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
sandro97git committed Mar 5, 2025
1 parent 4f2c6f4 commit ef5df3b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/jwt-cpp/jwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,7 @@ namespace jwt {
*/
ecdsa(helper::evp_pkey_handle key_pair, const EVP_MD* (*md)(), std::string name, size_t siglen)
: pkey(std::move(key_pair)), md(md), alg_name(std::move(name)), signature_length(siglen) {
if (!pkey) {
throw error::ecdsa_exception(error::ecdsa_error::no_key_provided);
}
if (!pkey) { throw error::ecdsa_exception(error::ecdsa_error::no_key_provided); }
size_t keysize = EVP_PKEY_bits(pkey.get());
if (keysize != signature_length * 4 && (signature_length != 132 || keysize != 521))
throw error::ecdsa_exception(error::ecdsa_error::invalid_key_size);
Expand Down

0 comments on commit ef5df3b

Please sign in to comment.