summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-08-17 22:31:54 -0700
committerMatthew Miller <matthew@millerti.me>2021-08-17 22:31:54 -0700
commitc1d3a69c9bb155aefd7c3764daec5fe85e08285d (patch)
tree81d66635054a5e82167c29b1889fb2a29130eb4c /packages/server/src
parenteec69d92dfbef0219b5304e6c6104e672a440fda (diff)
Dunno how this happened
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/attestation/verifyAttestationResponse.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/server/src/attestation/verifyAttestationResponse.ts b/packages/server/src/attestation/verifyAttestationResponse.ts
index 2b3b4d3..ac2bd5a 100644
--- a/packages/server/src/attestation/verifyAttestationResponse.ts
+++ b/packages/server/src/attestation/verifyAttestationResponse.ts
@@ -177,6 +177,9 @@ export default async function verifyAttestationResponse(
throw new Error(`Unexpected public key alg "${alg}", expected one of "${supported}"`);
}
+ const clientDataHash = toHash(base64url.toBuffer(response.clientDataJSON));
+ const rootCertificates = settingsService.getRootCertificates({ attestationFormat: fmt });
+
// Prepare arguments to pass to the relevant verification method
const verifierOpts: AttestationFormatVerifierOpts = {
aaguid,
@@ -189,9 +192,6 @@ export default async function verifyAttestationResponse(
rpIdHash,
};
- const clientDataHash = toHash(base64url.toBuffer(response.clientDataJSON));
- const rootCertificates = settingsService.getRootCertificates({ attestationFormat: fmt });
-
/**
* Verification can only be performed when attestation = 'direct'
*/