diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-19 14:18:02 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-19 14:18:02 -0700 |
commit | fd4d3611abadc354bd30deb441a7b6ffa3b3a57c (patch) | |
tree | d15ebe0f1e5680e7f33091c0b23d6a61645bd20c | |
parent | d7784a1e4efd682aaf0ea5f44dc14df2d53f4001 (diff) |
Move U2F_USER_PRESENTED back into types
-rw-r--r-- | src/attestation/verifications/verifyFIDOU2F.ts | 7 | ||||
-rw-r--r-- | src/types.ts | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/attestation/verifications/verifyFIDOU2F.ts b/src/attestation/verifications/verifyFIDOU2F.ts index a0f17f5..12cc808 100644 --- a/src/attestation/verifications/verifyFIDOU2F.ts +++ b/src/attestation/verifications/verifyFIDOU2F.ts @@ -1,6 +1,6 @@ import base64url from 'base64url'; -import { AttestationObject, VerifiedAttestation } from '@types'; +import { AttestationObject, VerifiedAttestation, U2F_USER_PRESENTED } from '@types'; import toHash from '@helpers/toHash'; import convertCOSEtoPKCS from '@helpers/convertCOSEtoPKCS'; import convertASN1toPEM from '@helpers/convertASN1toPEM'; @@ -8,10 +8,7 @@ import verifySignature from '@helpers/verifySignature'; import parseAttestationAuthData from '../parseAttestationAuthData'; -/** - * U2F Presence constant - */ -const U2F_USER_PRESENTED = 0x01; + export default function verifyAttestationFIDOU2F( diff --git a/src/types.ts b/src/types.ts index 0442b31..c419727 100644 --- a/src/types.ts +++ b/src/types.ts @@ -110,3 +110,7 @@ export type ParsedAssertionAuthData = { counter: number, counterBuf: Buffer, }; + +// U2F Presence constant +export const U2F_USER_PRESENTED = 0x01; + |