summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-07-27 22:12:30 -0700
committerMatthew Miller <matthew@millerti.me>2022-07-27 22:12:30 -0700
commit2fbf3bb8f218a749bc29dd37d5bb677a85d2cf5f (patch)
treefaef8ca430b94c35bef03cba271f354f46ec99de
parent04d9b5c392baab888639bb1d6d0d2f96e556171b (diff)
Export named convertPublicKeyToPEM()
-rw-r--r--packages/server/src/authentication/verifyAuthenticationResponse.ts2
-rw-r--r--packages/server/src/helpers/convertPublicKeyToPEM.ts2
-rw-r--r--packages/server/src/helpers/index.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.ts b/packages/server/src/authentication/verifyAuthenticationResponse.ts
index 227b0f1..d861f71 100644
--- a/packages/server/src/authentication/verifyAuthenticationResponse.ts
+++ b/packages/server/src/authentication/verifyAuthenticationResponse.ts
@@ -7,7 +7,7 @@ import {
import decodeClientDataJSON from '../helpers/decodeClientDataJSON';
import toHash from '../helpers/toHash';
-import convertPublicKeyToPEM from '../helpers/convertPublicKeyToPEM';
+import { convertPublicKeyToPEM } from '../helpers/convertPublicKeyToPEM';
import verifySignature from '../helpers/verifySignature';
import parseAuthenticatorData from '../helpers/parseAuthenticatorData';
import isBase64URLString from '../helpers/isBase64URLString';
diff --git a/packages/server/src/helpers/convertPublicKeyToPEM.ts b/packages/server/src/helpers/convertPublicKeyToPEM.ts
index 091f68e..5c0e39a 100644
--- a/packages/server/src/helpers/convertPublicKeyToPEM.ts
+++ b/packages/server/src/helpers/convertPublicKeyToPEM.ts
@@ -3,7 +3,7 @@ import jwkToPem from 'jwk-to-pem';
import { COSEKEYS, COSEKTY, COSECRV } from './convertCOSEtoPKCS';
-export default function convertPublicKeyToPEM(publicKey: Buffer): string {
+export function convertPublicKeyToPEM(publicKey: Buffer): string {
let struct;
try {
struct = cbor.decodeAllSync(publicKey)[0];
diff --git a/packages/server/src/helpers/index.ts b/packages/server/src/helpers/index.ts
index 01bc880..43a2ae2 100644
--- a/packages/server/src/helpers/index.ts
+++ b/packages/server/src/helpers/index.ts
@@ -1,7 +1,7 @@
import { convertAAGUIDToString } from './convertAAGUIDToString';
import { convertCertBufferToPEM } from './convertCertBufferToPEM';
import { convertCOSEtoPKCS } from './convertCOSEtoPKCS';
-import convertPublicKeyToPEM from './convertPublicKeyToPEM';
+import { convertPublicKeyToPEM } from './convertPublicKeyToPEM';
import decodeAttestationObject from './decodeAttestationObject';
import { decodeCborFirst } from './decodeCbor';
import decodeClientDataJSON from './decodeClientDataJSON';