diff options
author | Matthew Miller <matthew@millerti.me> | 2022-07-27 22:16:23 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-07-27 22:16:23 -0700 |
commit | eef3b984afd68d96e5f7b491f580baf2865f564f (patch) | |
tree | aaa6f2d4428a643c149c6c202d215c9f692f9ae6 | |
parent | 387a51d950114ca93c1965b7713299ddb32889fa (diff) |
Export named verifySignature()
8 files changed, 8 insertions, 8 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.ts b/packages/server/src/authentication/verifyAuthenticationResponse.ts index 8f59a75..e3dc770 100644 --- a/packages/server/src/authentication/verifyAuthenticationResponse.ts +++ b/packages/server/src/authentication/verifyAuthenticationResponse.ts @@ -8,7 +8,7 @@ import { import { decodeClientDataJSON } from '../helpers/decodeClientDataJSON'; import { toHash } from '../helpers/toHash'; import { convertPublicKeyToPEM } from '../helpers/convertPublicKeyToPEM'; -import verifySignature from '../helpers/verifySignature'; +import { verifySignature } from '../helpers/verifySignature'; import { parseAuthenticatorData } from '../helpers/parseAuthenticatorData'; import { isBase64URLString } from '../helpers/isBase64URLString'; import { parseBackupFlags } from '../helpers/parseBackupFlags'; diff --git a/packages/server/src/helpers/index.ts b/packages/server/src/helpers/index.ts index a55f0a2..d0c4f42 100644 --- a/packages/server/src/helpers/index.ts +++ b/packages/server/src/helpers/index.ts @@ -13,7 +13,7 @@ import { isCertRevoked } from './isCertRevoked'; import { parseAuthenticatorData } from './parseAuthenticatorData'; import { toHash } from './toHash'; import { validateCertificatePath } from './validateCertificatePath'; -import verifySignature from './verifySignature'; +import { verifySignature } from './verifySignature'; export { convertAAGUIDToString, diff --git a/packages/server/src/helpers/verifySignature.ts b/packages/server/src/helpers/verifySignature.ts index 2268d54..14089a2 100644 --- a/packages/server/src/helpers/verifySignature.ts +++ b/packages/server/src/helpers/verifySignature.ts @@ -8,7 +8,7 @@ import crypto from 'crypto'; * @param publicKey Authenticator's public key as a PEM certificate * @param algo Which algorithm to use to verify the signature (default: `'sha256'`) */ -export default function verifySignature( +export function verifySignature( signature: Buffer, signatureBase: Buffer, publicKey: string, diff --git a/packages/server/src/registration/verifications/tpm/verifyTPM.ts b/packages/server/src/registration/verifications/tpm/verifyTPM.ts index f70be38..5a472b4 100644 --- a/packages/server/src/registration/verifications/tpm/verifyTPM.ts +++ b/packages/server/src/registration/verifications/tpm/verifyTPM.ts @@ -16,7 +16,7 @@ import { toHash } from '../../../helpers/toHash'; import { convertCertBufferToPEM } from '../../../helpers/convertCertBufferToPEM'; import { validateCertificatePath } from '../../../helpers/validateCertificatePath'; import { getCertificateInfo } from '../../../helpers/getCertificateInfo'; -import verifySignature from '../../../helpers/verifySignature'; +import { verifySignature } from '../../../helpers/verifySignature'; import MetadataService from '../../../services/metadataService'; import verifyAttestationWithMetadata from '../../../metadata/verifyAttestationWithMetadata'; diff --git a/packages/server/src/registration/verifications/verifyAndroidKey.ts b/packages/server/src/registration/verifications/verifyAndroidKey.ts index d362d0d..093a16b 100644 --- a/packages/server/src/registration/verifications/verifyAndroidKey.ts +++ b/packages/server/src/registration/verifications/verifyAndroidKey.ts @@ -6,7 +6,7 @@ import type { AttestationFormatVerifierOpts } from '../verifyRegistrationRespons import { convertCertBufferToPEM } from '../../helpers/convertCertBufferToPEM'; import { validateCertificatePath } from '../../helpers/validateCertificatePath'; -import verifySignature from '../../helpers/verifySignature'; +import { verifySignature } from '../../helpers/verifySignature'; import { COSEALGHASH, convertCOSEtoPKCS } from '../../helpers/convertCOSEtoPKCS'; import MetadataService from '../../services/metadataService'; import verifyAttestationWithMetadata from '../../metadata/verifyAttestationWithMetadata'; diff --git a/packages/server/src/registration/verifications/verifyAndroidSafetyNet.ts b/packages/server/src/registration/verifications/verifyAndroidSafetyNet.ts index 643a14b..76d8e50 100644 --- a/packages/server/src/registration/verifications/verifyAndroidSafetyNet.ts +++ b/packages/server/src/registration/verifications/verifyAndroidSafetyNet.ts @@ -3,7 +3,7 @@ import base64url from 'base64url'; import type { AttestationFormatVerifierOpts } from '../verifyRegistrationResponse'; import { toHash } from '../../helpers/toHash'; -import verifySignature from '../../helpers/verifySignature'; +import { verifySignature } from '../../helpers/verifySignature'; import { getCertificateInfo } from '../../helpers/getCertificateInfo'; import { validateCertificatePath } from '../../helpers/validateCertificatePath'; import { convertCertBufferToPEM } from '../../helpers/convertCertBufferToPEM'; diff --git a/packages/server/src/registration/verifications/verifyFIDOU2F.ts b/packages/server/src/registration/verifications/verifyFIDOU2F.ts index 8a5519f..d23ecf1 100644 --- a/packages/server/src/registration/verifications/verifyFIDOU2F.ts +++ b/packages/server/src/registration/verifications/verifyFIDOU2F.ts @@ -3,7 +3,7 @@ import type { AttestationFormatVerifierOpts } from '../verifyRegistrationRespons import { convertCOSEtoPKCS } from '../../helpers/convertCOSEtoPKCS'; import { convertCertBufferToPEM } from '../../helpers/convertCertBufferToPEM'; import { validateCertificatePath } from '../../helpers/validateCertificatePath'; -import verifySignature from '../../helpers/verifySignature'; +import { verifySignature } from '../../helpers/verifySignature'; /** * Verify an attestation response with fmt 'fido-u2f' diff --git a/packages/server/src/registration/verifications/verifyPacked.ts b/packages/server/src/registration/verifications/verifyPacked.ts index 052c841..99175cd 100644 --- a/packages/server/src/registration/verifications/verifyPacked.ts +++ b/packages/server/src/registration/verifications/verifyPacked.ts @@ -14,7 +14,7 @@ import { toHash } from '../../helpers/toHash'; import { convertCertBufferToPEM } from '../../helpers/convertCertBufferToPEM'; import { validateCertificatePath } from '../../helpers/validateCertificatePath'; import { getCertificateInfo } from '../../helpers/getCertificateInfo'; -import verifySignature from '../../helpers/verifySignature'; +import { verifySignature } from '../../helpers/verifySignature'; import { decodeCredentialPublicKey } from '../../helpers/decodeCredentialPublicKey'; import MetadataService from '../../services/metadataService'; import verifyAttestationWithMetadata from '../../metadata/verifyAttestationWithMetadata'; |