From 72717cdc584aa4224a025ddc66b420db0858c5c1 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Mon, 3 Nov 2025 16:10:04 -0800 Subject: [PATCH] Fix EAB cal --- backend/src/ee/services/pki-acme/pki-acme-service.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.ts index 930e22872..2dee5e7f1 100644 --- a/backend/src/ee/services/pki-acme/pki-acme-service.ts +++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts @@ -352,11 +352,8 @@ export const pkiAcmeServiceFactory = ({ // Make sure the JWK in the EAB payload matches the one provided in the outer JWS payload const decoder = new TextDecoder(); const decodedEabPayload = decoder.decode(eabPayload); - const eabPayloadJson = JSON.parse(decodedEabPayload); - const eabPayloadJwkThumbprint = await calculateJwkThumbprint( - eabPayloadJson.jwk as JsonWebKey, - alg as "sha256" | "sha384" | "sha512" - ); + const eabJWK = JSON.parse(decodedEabPayload); + const eabPayloadJwkThumbprint = await calculateJwkThumbprint(eabJWK, "sha256"); if (eabPayloadJwkThumbprint !== publicKeyThumbprint || eabAlg !== alg) { throw new AcmeBadPublicKeyError({ message: "External account binding public key thumbprint or algorithm mismatch"