summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-19 01:03:15 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-19 01:03:15 -0700
commit1af9b98d689d623e4ecc9593d24cbb8621120222 (patch)
tree9081855ee79221b8c1bfed641ee2cb741366fa83 /src
parentdb6f558e96f7f27ba353d8f4e6303a021f6a7302 (diff)
Move U2F_USER_PRESENTED into verifyFIDOU2F
Diffstat (limited to 'src')
-rw-r--r--src/attestation/verifications/verifyFIDOU2F.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attestation/verifications/verifyFIDOU2F.ts b/src/attestation/verifications/verifyFIDOU2F.ts
index 3ee6ac1..d0af23d 100644
--- a/src/attestation/verifications/verifyFIDOU2F.ts
+++ b/src/attestation/verifications/verifyFIDOU2F.ts
@@ -1,13 +1,17 @@
import base64url from 'base64url';
import { AttestationObject, VerifiedAttestation } from '@types';
-import { U2F_USER_PRESENTED } from '@helpers/constants';
import toHash from '@helpers/toHash';
import parseAttestationAuthData from '@helpers/parseAttestationAuthData';
import convertCOSEECDHAtoPKCS from '@helpers/convertCOSEECDHAtoPKCS';
import convertASN1toPEM from '@helpers/convertASN1toPEM';
import verifySignature from '@helpers/verifySignature';
+/**
+ * U2F Presence constant
+ */
+const U2F_USER_PRESENTED = 0x01;
+
export default function verifyAttestationFIDOU2F(
attestationObject: AttestationObject,
base64ClientDataJSON: string,