mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 08:27:53 +00:00
Fix EAB cal
This commit is contained in:
@@ -352,11 +352,8 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
// Make sure the JWK in the EAB payload matches the one provided in the outer JWS payload
|
// Make sure the JWK in the EAB payload matches the one provided in the outer JWS payload
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
const decodedEabPayload = decoder.decode(eabPayload);
|
const decodedEabPayload = decoder.decode(eabPayload);
|
||||||
const eabPayloadJson = JSON.parse(decodedEabPayload);
|
const eabJWK = JSON.parse(decodedEabPayload);
|
||||||
const eabPayloadJwkThumbprint = await calculateJwkThumbprint(
|
const eabPayloadJwkThumbprint = await calculateJwkThumbprint(eabJWK, "sha256");
|
||||||
eabPayloadJson.jwk as JsonWebKey,
|
|
||||||
alg as "sha256" | "sha384" | "sha512"
|
|
||||||
);
|
|
||||||
if (eabPayloadJwkThumbprint !== publicKeyThumbprint || eabAlg !== alg) {
|
if (eabPayloadJwkThumbprint !== publicKeyThumbprint || eabAlg !== alg) {
|
||||||
throw new AcmeBadPublicKeyError({
|
throw new AcmeBadPublicKeyError({
|
||||||
message: "External account binding public key thumbprint or algorithm mismatch"
|
message: "External account binding public key thumbprint or algorithm mismatch"
|
||||||
|
|||||||
Reference in New Issue
Block a user