From 621d49d533e9dc2010126bb0a17ab831266c041c Mon Sep 17 00:00:00 2001 From: Derek Weitzel Date: Fri, 8 Nov 2019 10:13:23 -0600 Subject: [PATCH 1/2] Fix EC curve detection --- src/scitokens_internal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scitokens_internal.cpp b/src/scitokens_internal.cpp index 345165b..bb225ea 100644 --- a/src/scitokens_internal.cpp +++ b/src/scitokens_internal.cpp @@ -431,7 +431,7 @@ 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"; } else { From 61a04a43df1aaa911e9de4948571a3d35124f51e Mon Sep 17 00:00:00 2001 From: Derek Weitzel Date: Fri, 8 Nov 2019 10:36:43 -0600 Subject: [PATCH 2/2] Fix naming of EC to ES256 --- src/scitokens_internal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scitokens_internal.cpp b/src/scitokens_internal.cpp index bb225ea..0fe16af 100644 --- a/src/scitokens_internal.cpp +++ b/src/scitokens_internal.cpp @@ -433,7 +433,7 @@ Validator::get_public_key_pem(const std::string &issuer, const std::string &kid, } auto crv = iter3->second.get(); if (crv == "P-256") { - alg = "EC256"; + alg = "ES256"; } else { throw JsonException("Unsupported EC curve in public key"); }