diff options
author | Matthew Miller <matthew@millerti.me> | 2021-08-17 22:31:54 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-08-17 22:31:54 -0700 |
commit | c1d3a69c9bb155aefd7c3764daec5fe85e08285d (patch) | |
tree | 81d66635054a5e82167c29b1889fb2a29130eb4c /packages/server/src | |
parent | eec69d92dfbef0219b5304e6c6104e672a440fda (diff) |
Dunno how this happened
Diffstat (limited to 'packages/server/src')
-rw-r--r-- | packages/server/src/attestation/verifyAttestationResponse.ts | 6 |
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' */ |