diff --git a/src/scitokens_internal.cpp b/src/scitokens_internal.cpp index 345165b..0fe16af 100644 --- a/src/scitokens_internal.cpp +++ b/src/scitokens_internal.cpp @@ -431,9 +431,9 @@ Validator::get_public_key_pem(const std::string &issuer, const std::string &kid, if (iter3 == key_obj.end() || !iter3->second.is()) { throw JsonException("EC key is missing curve name"); } - auto crv = iter2->second.get(); + auto crv = iter3->second.get(); if (crv == "P-256") { - alg = "EC256"; + alg = "ES256"; } else { throw JsonException("Unsupported EC curve in public key"); }