diff options
-rw-r--r-- | packages/server/package.json | 8 | ||||
-rw-r--r-- | packages/server/src/helpers/convertCOSEtoPKCS.ts | 24 |
2 files changed, 25 insertions, 7 deletions
diff --git a/packages/server/package.json b/packages/server/package.json index c908844..11adae2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -54,20 +54,16 @@ "base64url": "^3.0.1", "cbor": "^5.1.0", "debug": "^4.3.2", - "elliptic": "^6.5.3", "jsrsasign": "^10.4.0", "jwk-to-pem": "^2.0.4", - "node-fetch": "^2.6.0", - "node-rsa": "^1.1.1" + "node-fetch": "^2.6.0" }, "gitHead": "33ccf8c6c9add811c87d3089e24156c2342b3498", "devDependencies": { "@types/cbor": "^5.0.1", "@types/debug": "^4.1.7", - "@types/elliptic": "^6.4.13", "@types/jsrsasign": "^8.0.13", "@types/jwk-to-pem": "^2.0.1", - "@types/node-fetch": "^2.5.12", - "@types/node-rsa": "^1.1.1" + "@types/node-fetch": "^2.5.12" } } diff --git a/packages/server/src/helpers/convertCOSEtoPKCS.ts b/packages/server/src/helpers/convertCOSEtoPKCS.ts index bd4a4c6..618a0dc 100644 --- a/packages/server/src/helpers/convertCOSEtoPKCS.ts +++ b/packages/server/src/helpers/convertCOSEtoPKCS.ts @@ -1,4 +1,3 @@ -import type { SigningSchemeHash } from 'node-rsa'; import { COSEAlgorithmIdentifier } from '@simplewebauthn/typescript-types'; import { decodeCborFirst } from './decodeCbor'; @@ -76,3 +75,26 @@ export const COSEALGHASH: { [key: string]: string } = { '-8': 'sha512', '-7': 'sha256', }; + +/** + * Imported from node-rsa's types + */ +type SigningSchemeHash = + | 'pkcs1-ripemd160' + | 'pkcs1-md4' + | 'pkcs1-md5' + | 'pkcs1-sha' + | 'pkcs1-sha1' + | 'pkcs1-sha224' + | 'pkcs1-sha256' + | 'pkcs1-sha384' + | 'pkcs1-sha512' + | 'pss-ripemd160' + | 'pss-md4' + | 'pss-md5' + | 'pss-sha' + | 'pss-sha1' + | 'pss-sha224' + | 'pss-sha256' + | 'pss-sha384' + | 'pss-sha512'; |