@simplewebauthn/server 13.1.2 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/authentication/generateAuthenticationOptions.d.ts +2 -2
- package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -1
- package/esm/helpers/convertAAGUIDToString.d.ts +2 -1
- package/esm/helpers/convertAAGUIDToString.d.ts.map +1 -1
- package/esm/helpers/convertCOSEtoPKCS.d.ts +2 -1
- package/esm/helpers/convertCOSEtoPKCS.d.ts.map +1 -1
- package/esm/helpers/convertCertBufferToPEM.d.ts +2 -2
- package/esm/helpers/convertCertBufferToPEM.d.ts.map +1 -1
- package/esm/helpers/convertPEMToBytes.d.ts +2 -1
- package/esm/helpers/convertPEMToBytes.d.ts.map +1 -1
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts +2 -1
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -1
- package/esm/helpers/convertX509PublicKeyToCOSE.js +2 -2
- package/esm/helpers/cose.d.ts +11 -10
- package/esm/helpers/cose.d.ts.map +1 -1
- package/esm/helpers/cose.js +0 -11
- package/esm/helpers/decodeAttestationObject.d.ts +8 -7
- package/esm/helpers/decodeAttestationObject.d.ts.map +1 -1
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts +2 -1
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -1
- package/esm/helpers/decodeCredentialPublicKey.d.ts +3 -2
- package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -1
- package/esm/helpers/generateChallenge.d.ts +3 -2
- package/esm/helpers/generateChallenge.d.ts.map +1 -1
- package/esm/helpers/generateUserID.d.ts +3 -2
- package/esm/helpers/generateUserID.d.ts.map +1 -1
- package/esm/helpers/getCertificateInfo.d.ts +2 -1
- package/esm/helpers/getCertificateInfo.d.ts.map +1 -1
- package/esm/helpers/isCertRevoked.d.ts +2 -2
- package/esm/helpers/isCertRevoked.d.ts.map +1 -1
- package/esm/helpers/isCertRevoked.js +19 -22
- package/esm/helpers/iso/isoBase64URL.d.ts +3 -3
- package/esm/helpers/iso/isoBase64URL.d.ts.map +1 -1
- package/esm/helpers/iso/isoBase64URL.js +6 -1
- package/esm/helpers/iso/isoCBOR.d.ts +3 -2
- package/esm/helpers/iso/isoCBOR.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/digest.d.ts +3 -2
- package/esm/helpers/iso/isoCrypto/digest.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts +2 -1
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +2 -1
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/verify.d.ts +4 -3
- package/esm/helpers/iso/isoCrypto/verify.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts +4 -3
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts +4 -3
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -1
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts +4 -3
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -1
- package/esm/helpers/iso/isoUint8Array.d.ts +9 -8
- package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -1
- package/esm/helpers/matchExpectedRPID.d.ts +2 -1
- package/esm/helpers/matchExpectedRPID.d.ts.map +1 -1
- package/esm/helpers/parseAuthenticatorData.d.ts +10 -9
- package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -1
- package/esm/helpers/toHash.d.ts +3 -2
- package/esm/helpers/toHash.d.ts.map +1 -1
- package/esm/helpers/validateCertificatePath.d.ts.map +1 -1
- package/esm/helpers/validateCertificatePath.js +85 -90
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts +3 -2
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -1
- package/esm/helpers/verifySignature.d.ts +5 -4
- package/esm/helpers/verifySignature.d.ts.map +1 -1
- package/esm/metadata/verifyAttestationWithMetadata.d.ts +3 -2
- package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -1
- package/esm/metadata/verifyJWT.d.ts +2 -1
- package/esm/metadata/verifyJWT.d.ts.map +1 -1
- package/esm/registration/generateRegistrationOptions.d.ts +3 -3
- package/esm/registration/generateRegistrationOptions.d.ts.map +1 -1
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts +9 -8
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -1
- package/esm/registration/verifications/tpm/parsePubArea.d.ts +4 -3
- package/esm/registration/verifications/tpm/parsePubArea.d.ts.map +1 -1
- package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -1
- package/esm/registration/verifications/verifyAttestationAndroidKey.js +2 -2
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -1
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.js +2 -2
- package/esm/registration/verifyRegistrationResponse.d.ts +16 -10
- package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -1
- package/esm/registration/verifyRegistrationResponse.js +12 -10
- package/esm/services/defaultRootCerts/mds.d.ts +1 -1
- package/esm/services/defaultRootCerts/mds.d.ts.map +1 -1
- package/esm/services/defaultRootCerts/mds.js +20 -20
- package/esm/services/metadataService.d.ts +2 -1
- package/esm/services/metadataService.d.ts.map +1 -1
- package/esm/services/metadataService.js +1 -1
- package/esm/services/settingsService.d.ts +2 -1
- package/esm/services/settingsService.d.ts.map +1 -1
- package/esm/types/index.d.ts +16 -1
- package/esm/types/index.d.ts.map +1 -1
- package/package.json +3 -2
- package/script/authentication/generateAuthenticationOptions.d.ts +2 -2
- package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -1
- package/script/helpers/convertAAGUIDToString.d.ts +2 -1
- package/script/helpers/convertAAGUIDToString.d.ts.map +1 -1
- package/script/helpers/convertCOSEtoPKCS.d.ts +2 -1
- package/script/helpers/convertCOSEtoPKCS.d.ts.map +1 -1
- package/script/helpers/convertCertBufferToPEM.d.ts +2 -2
- package/script/helpers/convertCertBufferToPEM.d.ts.map +1 -1
- package/script/helpers/convertPEMToBytes.d.ts +2 -1
- package/script/helpers/convertPEMToBytes.d.ts.map +1 -1
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts +2 -1
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -1
- package/script/helpers/convertX509PublicKeyToCOSE.js +2 -2
- package/script/helpers/cose.d.ts +11 -10
- package/script/helpers/cose.d.ts.map +1 -1
- package/script/helpers/cose.js +0 -11
- package/script/helpers/decodeAttestationObject.d.ts +8 -7
- package/script/helpers/decodeAttestationObject.d.ts.map +1 -1
- package/script/helpers/decodeAuthenticatorExtensions.d.ts +2 -1
- package/script/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -1
- package/script/helpers/decodeCredentialPublicKey.d.ts +3 -2
- package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -1
- package/script/helpers/generateChallenge.d.ts +3 -2
- package/script/helpers/generateChallenge.d.ts.map +1 -1
- package/script/helpers/generateUserID.d.ts +3 -2
- package/script/helpers/generateUserID.d.ts.map +1 -1
- package/script/helpers/getCertificateInfo.d.ts +2 -1
- package/script/helpers/getCertificateInfo.d.ts.map +1 -1
- package/script/helpers/isCertRevoked.d.ts +2 -2
- package/script/helpers/isCertRevoked.d.ts.map +1 -1
- package/script/helpers/isCertRevoked.js +19 -22
- package/script/helpers/iso/isoBase64URL.d.ts +3 -3
- package/script/helpers/iso/isoBase64URL.d.ts.map +1 -1
- package/script/helpers/iso/isoBase64URL.js +6 -1
- package/script/helpers/iso/isoCBOR.d.ts +3 -2
- package/script/helpers/iso/isoCBOR.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/digest.d.ts +3 -2
- package/script/helpers/iso/isoCrypto/digest.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts +2 -1
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +2 -1
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/verify.d.ts +4 -3
- package/script/helpers/iso/isoCrypto/verify.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts +4 -3
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts +4 -3
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -1
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts +4 -3
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -1
- package/script/helpers/iso/isoUint8Array.d.ts +9 -8
- package/script/helpers/iso/isoUint8Array.d.ts.map +1 -1
- package/script/helpers/iso/isoUint8Array.js +4 -4
- package/script/helpers/matchExpectedRPID.d.ts +2 -1
- package/script/helpers/matchExpectedRPID.d.ts.map +1 -1
- package/script/helpers/parseAuthenticatorData.d.ts +10 -9
- package/script/helpers/parseAuthenticatorData.d.ts.map +1 -1
- package/script/helpers/toHash.d.ts +3 -2
- package/script/helpers/toHash.d.ts.map +1 -1
- package/script/helpers/validateCertificatePath.d.ts.map +1 -1
- package/script/helpers/validateCertificatePath.js +85 -90
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts +3 -2
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -1
- package/script/helpers/verifySignature.d.ts +5 -4
- package/script/helpers/verifySignature.d.ts.map +1 -1
- package/script/metadata/verifyAttestationWithMetadata.d.ts +3 -2
- package/script/metadata/verifyAttestationWithMetadata.d.ts.map +1 -1
- package/script/metadata/verifyJWT.d.ts +2 -1
- package/script/metadata/verifyJWT.d.ts.map +1 -1
- package/script/registration/generateRegistrationOptions.d.ts +3 -3
- package/script/registration/generateRegistrationOptions.d.ts.map +1 -1
- package/script/registration/verifications/tpm/parseCertInfo.d.ts +9 -8
- package/script/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -1
- package/script/registration/verifications/tpm/parsePubArea.d.ts +4 -3
- package/script/registration/verifications/tpm/parsePubArea.d.ts.map +1 -1
- package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -1
- package/script/registration/verifications/verifyAttestationAndroidKey.js +2 -2
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -1
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.js +2 -2
- package/script/registration/verifyRegistrationResponse.d.ts +16 -10
- package/script/registration/verifyRegistrationResponse.d.ts.map +1 -1
- package/script/registration/verifyRegistrationResponse.js +12 -10
- package/script/services/defaultRootCerts/mds.d.ts +1 -1
- package/script/services/defaultRootCerts/mds.d.ts.map +1 -1
- package/script/services/defaultRootCerts/mds.js +20 -20
- package/script/services/metadataService.d.ts +2 -1
- package/script/services/metadataService.d.ts.map +1 -1
- package/script/services/metadataService.js +1 -1
- package/script/services/settingsService.d.ts +2 -1
- package/script/services/settingsService.d.ts.map +1 -1
- package/script/types/index.d.ts +16 -1
- package/script/types/index.d.ts.map +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Convert authenticator extension data buffer to a proper object
|
|
3
4
|
*
|
|
4
5
|
* @param extensionData Authenticator Extension Data buffer
|
|
5
6
|
*/
|
|
6
|
-
export declare function decodeAuthenticatorExtensions(extensionData:
|
|
7
|
+
export declare function decodeAuthenticatorExtensions(extensionData: Uint8Array_): AuthenticationExtensionsAuthenticatorOutputs | undefined;
|
|
7
8
|
/**
|
|
8
9
|
* Attempt to support authenticator extensions we might not know about in WebAuthn
|
|
9
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decodeAuthenticatorExtensions.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAuthenticatorExtensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decodeAuthenticatorExtensions.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAuthenticatorExtensions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,WAAW,GACzB,4CAA4C,GAAG,SAAS,CAU1D;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,OAAO,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { COSEPublicKey } from './cose.js';
|
|
2
|
-
|
|
1
|
+
import type { COSEPublicKey } from './cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
3
|
+
export declare function decodeCredentialPublicKey(publicKey: Uint8Array_): COSEPublicKey;
|
|
3
4
|
/**
|
|
4
5
|
* Make it possible to stub the return value during testing
|
|
5
6
|
* @ignore Don't include this in docs output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,WAAW,GACrB,aAAa,CAIf;AAED;;;GAGG;AACH,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Generate a suitably random value to be used as an attestation or assertion challenge
|
|
3
4
|
*/
|
|
4
|
-
export declare function generateChallenge(): Promise<
|
|
5
|
+
export declare function generateChallenge(): Promise<Uint8Array_>;
|
|
5
6
|
/**
|
|
6
7
|
* Make it possible to stub the return value during testing
|
|
7
8
|
* @ignore Don't include this in docs output
|
|
8
9
|
*/
|
|
9
10
|
export declare const _generateChallengeInternals: {
|
|
10
|
-
stubThis: (value:
|
|
11
|
+
stubThis: (value: Uint8Array_) => Uint8Array;
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=generateChallenge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC,CAc9D;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B;sBACpB,WAAW;CAC9B,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Generate a suitably random value to be used as user ID
|
|
3
4
|
*/
|
|
4
|
-
export declare function generateUserID(): Promise<
|
|
5
|
+
export declare function generateUserID(): Promise<Uint8Array_>;
|
|
5
6
|
/**
|
|
6
7
|
* Make it possible to stub the return value during testing
|
|
7
8
|
* @ignore Don't include this in docs output
|
|
8
9
|
*/
|
|
9
10
|
export declare const _generateUserIDInternals: {
|
|
10
|
-
stubThis: (value:
|
|
11
|
+
stubThis: (value: Uint8Array_) => Uint8Array;
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=generateUserID.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAU3D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;sBACjB,WAAW;CAC9B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Certificate } from '@peculiar/asn1-x509';
|
|
2
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
2
3
|
export type CertificateInfo = {
|
|
3
4
|
issuer: Issuer;
|
|
4
5
|
subject: Subject;
|
|
@@ -27,6 +28,6 @@ type Subject = {
|
|
|
27
28
|
*
|
|
28
29
|
* @param pemCertificate Result from call to `convertASN1toPEM(x5c[0])`
|
|
29
30
|
*/
|
|
30
|
-
export declare function getCertificateInfo(leafCertBuffer:
|
|
31
|
+
export declare function getCertificateInfo(leafCertBuffer: Uint8Array_): CertificateInfo;
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=getCertificateInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCertificateInfo.d.ts","sourceRoot":"","sources":["../../src/helpers/getCertificateInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,WAAW,CAAC;CAChC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AASF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"getCertificateInfo.d.ts","sourceRoot":"","sources":["../../src/helpers/getCertificateInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAE5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,WAAW,CAAC;CAChC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AASF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,WAAW,GAC1B,eAAe,CA+CjB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type X509Certificate } from '@peculiar/x509';
|
|
2
2
|
/**
|
|
3
3
|
* A method to pull a CRL from a certificate and compare its serial number to the list of revoked
|
|
4
4
|
* certificate serial numbers within the CRL.
|
|
5
5
|
*
|
|
6
6
|
* CRL certificate structure referenced from https://tools.ietf.org/html/rfc5280#page-117
|
|
7
7
|
*/
|
|
8
|
-
export declare function isCertRevoked(cert:
|
|
8
|
+
export declare function isCertRevoked(cert: X509Certificate): Promise<boolean>;
|
|
9
9
|
//# sourceMappingURL=isCertRevoked.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCertRevoked.d.ts","sourceRoot":"","sources":["../../src/helpers/isCertRevoked.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isCertRevoked.d.ts","sourceRoot":"","sources":["../../src/helpers/isCertRevoked.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,gBAAgB,CAAC;AAexB;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAkG3E"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isCertRevoked = isCertRevoked;
|
|
4
|
-
const
|
|
5
|
-
const asn1_x509_1 = require("@peculiar/asn1-x509");
|
|
6
|
-
const index_js_1 = require("./iso/index.js");
|
|
4
|
+
const x509_1 = require("@peculiar/x509");
|
|
7
5
|
const fetch_js_1 = require("./fetch.js");
|
|
8
6
|
const cacheRevokedCerts = {};
|
|
9
7
|
/**
|
|
@@ -13,7 +11,7 @@ const cacheRevokedCerts = {};
|
|
|
13
11
|
* CRL certificate structure referenced from https://tools.ietf.org/html/rfc5280#page-117
|
|
14
12
|
*/
|
|
15
13
|
async function isCertRevoked(cert) {
|
|
16
|
-
const { extensions } = cert
|
|
14
|
+
const { extensions } = cert;
|
|
17
15
|
if (!extensions) {
|
|
18
16
|
return false;
|
|
19
17
|
}
|
|
@@ -21,40 +19,39 @@ async function isCertRevoked(cert) {
|
|
|
21
19
|
let extSubjectKeyID;
|
|
22
20
|
let extCRLDistributionPoints;
|
|
23
21
|
extensions.forEach((ext) => {
|
|
24
|
-
if (ext
|
|
25
|
-
extAuthorityKeyID =
|
|
22
|
+
if (ext instanceof x509_1.AuthorityKeyIdentifierExtension) {
|
|
23
|
+
extAuthorityKeyID = ext;
|
|
26
24
|
}
|
|
27
|
-
else if (ext
|
|
28
|
-
extSubjectKeyID =
|
|
25
|
+
else if (ext instanceof x509_1.SubjectKeyIdentifierExtension) {
|
|
26
|
+
extSubjectKeyID = ext;
|
|
29
27
|
}
|
|
30
|
-
else if (ext
|
|
31
|
-
extCRLDistributionPoints =
|
|
28
|
+
else if (ext instanceof x509_1.CRLDistributionPointsExtension) {
|
|
29
|
+
extCRLDistributionPoints = ext;
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
// Check to see if we've got cached info for the cert's CA
|
|
35
33
|
let keyIdentifier = undefined;
|
|
36
|
-
if (extAuthorityKeyID && extAuthorityKeyID.
|
|
37
|
-
keyIdentifier =
|
|
34
|
+
if (extAuthorityKeyID && extAuthorityKeyID.keyId) {
|
|
35
|
+
keyIdentifier = extAuthorityKeyID.keyId;
|
|
38
36
|
}
|
|
39
37
|
else if (extSubjectKeyID) {
|
|
40
38
|
/**
|
|
41
39
|
* We might be dealing with a self-signed root certificate. Check the
|
|
42
40
|
* Subject key Identifier extension next.
|
|
43
41
|
*/
|
|
44
|
-
keyIdentifier =
|
|
42
|
+
keyIdentifier = extSubjectKeyID.keyId;
|
|
45
43
|
}
|
|
46
|
-
const certSerialHex = index_js_1.isoUint8Array.toHex(new Uint8Array(cert.tbsCertificate.serialNumber));
|
|
47
44
|
if (keyIdentifier) {
|
|
48
45
|
const cached = cacheRevokedCerts[keyIdentifier];
|
|
49
46
|
if (cached) {
|
|
50
47
|
const now = new Date();
|
|
51
48
|
// If there's a nextUpdate then make sure we're before it
|
|
52
49
|
if (!cached.nextUpdate || cached.nextUpdate > now) {
|
|
53
|
-
return cached.revokedCerts.indexOf(
|
|
50
|
+
return cached.revokedCerts.indexOf(cert.serialNumber) >= 0;
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
|
-
const crlURL = extCRLDistributionPoints?.[0].distributionPoint?.fullName?.[0]
|
|
54
|
+
const crlURL = extCRLDistributionPoints?.distributionPoints?.[0].distributionPoint?.fullName?.[0]
|
|
58
55
|
.uniformResourceIdentifier;
|
|
59
56
|
// If no URL is provided then we have nothing to check
|
|
60
57
|
if (!crlURL) {
|
|
@@ -71,7 +68,7 @@ async function isCertRevoked(cert) {
|
|
|
71
68
|
}
|
|
72
69
|
let data;
|
|
73
70
|
try {
|
|
74
|
-
data =
|
|
71
|
+
data = new x509_1.X509Crl(certListBytes);
|
|
75
72
|
}
|
|
76
73
|
catch (_err) {
|
|
77
74
|
// Something was malformed with the CRL, so pass
|
|
@@ -82,21 +79,21 @@ async function isCertRevoked(cert) {
|
|
|
82
79
|
nextUpdate: undefined,
|
|
83
80
|
};
|
|
84
81
|
// nextUpdate
|
|
85
|
-
if (data.
|
|
86
|
-
newCached.nextUpdate = data.
|
|
82
|
+
if (data.nextUpdate) {
|
|
83
|
+
newCached.nextUpdate = data.nextUpdate;
|
|
87
84
|
}
|
|
88
85
|
// revokedCertificates
|
|
89
|
-
const revokedCerts = data.
|
|
86
|
+
const revokedCerts = data.entries;
|
|
90
87
|
if (revokedCerts) {
|
|
91
88
|
for (const cert of revokedCerts) {
|
|
92
|
-
const revokedHex =
|
|
89
|
+
const revokedHex = cert.serialNumber;
|
|
93
90
|
newCached.revokedCerts.push(revokedHex);
|
|
94
91
|
}
|
|
95
92
|
// Cache the results
|
|
96
93
|
if (keyIdentifier) {
|
|
97
94
|
cacheRevokedCerts[keyIdentifier] = newCached;
|
|
98
95
|
}
|
|
99
|
-
return newCached.revokedCerts.indexOf(
|
|
96
|
+
return newCached.revokedCerts.indexOf(cert.serialNumber) >= 0;
|
|
100
97
|
}
|
|
101
98
|
return false;
|
|
102
99
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Base64URLString } from '../../types/index.js';
|
|
1
|
+
import type { Base64URLString, Uint8Array_ } from '../../types/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
|
|
4
4
|
* credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or
|
|
@@ -7,7 +7,7 @@ import type { Base64URLString } from '../../types/index.js';
|
|
|
7
7
|
* @param buffer Value to decode from base64
|
|
8
8
|
* @param to (optional) The decoding to use, in case it's desirable to decode from base64 instead
|
|
9
9
|
*/
|
|
10
|
-
export declare function toBuffer(base64urlString: string, from?: 'base64' | 'base64url'):
|
|
10
|
+
export declare function toBuffer(base64urlString: string, from?: 'base64' | 'base64url'): Uint8Array_;
|
|
11
11
|
/**
|
|
12
12
|
* Encode the given array buffer into a Base64URL-encoded string. Ideal for converting various
|
|
13
13
|
* credential response ArrayBuffers to string for sending back to the server as JSON.
|
|
@@ -15,7 +15,7 @@ export declare function toBuffer(base64urlString: string, from?: 'base64' | 'bas
|
|
|
15
15
|
* @param buffer Value to encode to base64
|
|
16
16
|
* @param to (optional) The encoding to use, in case it's desirable to encode to base64 instead
|
|
17
17
|
*/
|
|
18
|
-
export declare function fromBuffer(buffer:
|
|
18
|
+
export declare function fromBuffer(buffer: Uint8Array_, to?: 'base64' | 'base64url'): string;
|
|
19
19
|
/**
|
|
20
20
|
* Convert a base64url string into base64
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,WAAW,CAGb;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAOR;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAEnE"}
|
|
@@ -36,7 +36,12 @@ function toBuffer(base64urlString, from = 'base64url') {
|
|
|
36
36
|
* @param to (optional) The encoding to use, in case it's desirable to encode to base64 instead
|
|
37
37
|
*/
|
|
38
38
|
function fromBuffer(buffer, to = 'base64url') {
|
|
39
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Gracefully handle Uint8Array subclass types, like Node's Buffer, that can have a large
|
|
41
|
+
* ArrayBuffer backing it.
|
|
42
|
+
*/
|
|
43
|
+
const _normalized = new Uint8Array(buffer);
|
|
44
|
+
return base64_1.default.fromArrayBuffer(_normalized.buffer, to === 'base64url');
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Convert a base64url string into base64
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module
|
|
4
4
|
*/
|
|
5
5
|
import * as tinyCbor from '@levischuck/tiny-cbor';
|
|
6
|
+
import type { Uint8Array_ } from '../../types/index.js';
|
|
6
7
|
/**
|
|
7
8
|
* Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
|
|
8
9
|
*
|
|
@@ -20,9 +21,9 @@ import * as tinyCbor from '@levischuck/tiny-cbor';
|
|
|
20
21
|
* @param asObject (optional) Whether to convert any CBOR Maps into JavaScript Objects. Defaults to
|
|
21
22
|
* `false`
|
|
22
23
|
*/
|
|
23
|
-
export declare function decodeFirst<Type>(input:
|
|
24
|
+
export declare function decodeFirst<Type>(input: Uint8Array_): Type;
|
|
24
25
|
/**
|
|
25
26
|
* Encode data to CBOR
|
|
26
27
|
*/
|
|
27
|
-
export declare function encode(input: tinyCbor.CBORType):
|
|
28
|
+
export declare function encode(input: tinyCbor.CBORType): Uint8Array_;
|
|
28
29
|
//# sourceMappingURL=isoCBOR.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAQ1D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,WAAW,CAE5D"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { COSEALG } from '../../cose.js';
|
|
1
|
+
import type { COSEALG } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Generate a digest of the provided data.
|
|
4
5
|
*
|
|
5
6
|
* @param data The data to generate a digest of
|
|
6
7
|
* @param algorithm A COSE algorithm ID that maps to a desired SHA algorithm
|
|
7
8
|
*/
|
|
8
|
-
export declare function digest(data:
|
|
9
|
+
export declare function digest(data: Uint8Array_, algorithm: COSEALG): Promise<Uint8Array_>;
|
|
9
10
|
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/digest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/digest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAsB,MAAM,CAC1B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Fill up the provided bytes array with random bytes equal to its length.
|
|
3
4
|
*
|
|
4
5
|
* @returns the same bytes array passed into the method
|
|
5
6
|
*/
|
|
6
|
-
export declare function getRandomValues(array:
|
|
7
|
+
export declare function getRandomValues(array: Uint8Array_): Promise<Uint8Array_>;
|
|
7
8
|
//# sourceMappingURL=getRandomValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRandomValues.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getRandomValues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRandomValues.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getRandomValues.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAM9E"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { COSECRV } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* In WebAuthn, EC2 signatures are wrapped in ASN.1 structure so we need to peel r and s apart.
|
|
4
5
|
*
|
|
5
6
|
* See https://www.w3.org/TR/webauthn-2/#sctn-signature-attestation-types
|
|
6
7
|
*/
|
|
7
|
-
export declare function unwrapEC2Signature(signature:
|
|
8
|
+
export declare function unwrapEC2Signature(signature: Uint8Array_, crv: COSECRV): Uint8Array_;
|
|
8
9
|
//# sourceMappingURL=unwrapEC2Signature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unwrapEC2Signature.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/unwrapEC2Signature.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"unwrapEC2Signature.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/unwrapEC2Signature.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,GAAG,WAAW,CAepF"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { COSEALG, COSEPublicKey } from '../../cose.js';
|
|
1
|
+
import { type COSEALG, type COSEPublicKey } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Verify signatures with their public key. Supports EC2 and RSA public keys.
|
|
4
5
|
*/
|
|
5
6
|
export declare function verify(opts: {
|
|
6
7
|
cosePublicKey: COSEPublicKey;
|
|
7
|
-
signature:
|
|
8
|
-
data:
|
|
8
|
+
signature: Uint8Array_;
|
|
9
|
+
data: Uint8Array_;
|
|
9
10
|
shaHashOverride?: COSEALG;
|
|
10
11
|
}): Promise<boolean>;
|
|
11
12
|
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,aAAa,EAKnB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBnB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { COSEALG, COSEPublicKeyEC2 } from '../../cose.js';
|
|
1
|
+
import { type COSEALG, type COSEPublicKeyEC2 } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Verify a signature using an EC2 public key
|
|
4
5
|
*/
|
|
5
6
|
export declare function verifyEC2(opts: {
|
|
6
7
|
cosePublicKey: COSEPublicKeyEC2;
|
|
7
|
-
signature:
|
|
8
|
-
data:
|
|
8
|
+
signature: Uint8Array_;
|
|
9
|
+
data: Uint8Array_;
|
|
9
10
|
shaHashOverride?: COSEALG;
|
|
10
11
|
}): Promise<boolean>;
|
|
11
12
|
//# sourceMappingURL=verifyEC2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyEC2.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyEC2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"verifyEC2.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyEC2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CA0EnB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { COSEPublicKeyOKP } from '../../cose.js';
|
|
1
|
+
import { type COSEPublicKeyOKP } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
export declare function verifyOKP(opts: {
|
|
3
4
|
cosePublicKey: COSEPublicKeyOKP;
|
|
4
|
-
signature:
|
|
5
|
-
data:
|
|
5
|
+
signature: Uint8Array_;
|
|
6
|
+
data: Uint8Array_;
|
|
6
7
|
}): Promise<boolean>;
|
|
7
8
|
//# sourceMappingURL=verifyOKP.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyOKP.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyOKP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,gBAAgB,EAAa,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"verifyOKP.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyOKP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAKpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;CACnB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyDnB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { COSEALG, COSEPublicKeyRSA } from '../../cose.js';
|
|
1
|
+
import { type COSEALG, type COSEPublicKeyRSA } from '../../cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../../../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Verify a signature using an RSA public key
|
|
4
5
|
*/
|
|
5
6
|
export declare function verifyRSA(opts: {
|
|
6
7
|
cosePublicKey: COSEPublicKeyRSA;
|
|
7
|
-
signature:
|
|
8
|
-
data:
|
|
8
|
+
signature: Uint8Array_;
|
|
9
|
+
data: Uint8Array_;
|
|
9
10
|
shaHashOverride?: COSEALG;
|
|
10
11
|
}): Promise<boolean>;
|
|
11
12
|
//# sourceMappingURL=verifyRSA.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyRSA.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyRSA.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,gBAAgB,EAAa,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"verifyRSA.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyRSA.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAY,KAAK,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAMzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CA2FnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* A runtime-agnostic collection of methods for working with Uint8Arrays
|
|
3
4
|
* @module
|
|
@@ -5,37 +6,37 @@
|
|
|
5
6
|
/**
|
|
6
7
|
* Make sure two Uint8Arrays are deeply equivalent
|
|
7
8
|
*/
|
|
8
|
-
export declare function areEqual(array1:
|
|
9
|
+
export declare function areEqual(array1: Uint8Array_, array2: Uint8Array_): boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Convert a Uint8Array to Hexadecimal.
|
|
11
12
|
*
|
|
12
13
|
* A replacement for `Buffer.toString('hex')`
|
|
13
14
|
*/
|
|
14
|
-
export declare function toHex(array:
|
|
15
|
+
export declare function toHex(array: Uint8Array_): string;
|
|
15
16
|
/**
|
|
16
17
|
* Convert a hexadecimal string to isoUint8Array.
|
|
17
18
|
*
|
|
18
19
|
* A replacement for `Buffer.from('...', 'hex')`
|
|
19
20
|
*/
|
|
20
|
-
export declare function fromHex(hex: string):
|
|
21
|
+
export declare function fromHex(hex: string): Uint8Array_;
|
|
21
22
|
/**
|
|
22
23
|
* Combine multiple Uint8Arrays into a single Uint8Array
|
|
23
24
|
*/
|
|
24
|
-
export declare function concat(arrays:
|
|
25
|
+
export declare function concat(arrays: Uint8Array_[]): Uint8Array_;
|
|
25
26
|
/**
|
|
26
27
|
* Convert bytes into a UTF-8 string
|
|
27
28
|
*/
|
|
28
|
-
export declare function toUTF8String(array:
|
|
29
|
+
export declare function toUTF8String(array: Uint8Array_): string;
|
|
29
30
|
/**
|
|
30
31
|
* Convert a UTF-8 string back into bytes
|
|
31
32
|
*/
|
|
32
|
-
export declare function fromUTF8String(utf8String: string):
|
|
33
|
+
export declare function fromUTF8String(utf8String: string): Uint8Array_;
|
|
33
34
|
/**
|
|
34
35
|
* Convert an ASCII string to Uint8Array
|
|
35
36
|
*/
|
|
36
|
-
export declare function fromASCIIString(value: string):
|
|
37
|
+
export declare function fromASCIIString(value: string): Uint8Array_;
|
|
37
38
|
/**
|
|
38
39
|
* Prepare a DataView we can slice our way around in as we parse the bytes in a Uint8Array
|
|
39
40
|
*/
|
|
40
|
-
export declare function toDataView(array:
|
|
41
|
+
export declare function toDataView(array: Uint8Array_): DataView;
|
|
41
42
|
//# sourceMappingURL=isoUint8Array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isoUint8Array.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoUint8Array.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"isoUint8Array.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoUint8Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAM1E;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAKhD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAehD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAYzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAGvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAG9D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAE1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ,CAEvD"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* A runtime-agnostic collection of methods for working with Uint8Arrays
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.areEqual = areEqual;
|
|
8
4
|
exports.toHex = toHex;
|
|
@@ -12,6 +8,10 @@ exports.toUTF8String = toUTF8String;
|
|
|
12
8
|
exports.fromUTF8String = fromUTF8String;
|
|
13
9
|
exports.fromASCIIString = fromASCIIString;
|
|
14
10
|
exports.toDataView = toDataView;
|
|
11
|
+
/**
|
|
12
|
+
* A runtime-agnostic collection of methods for working with Uint8Arrays
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
15
|
/**
|
|
16
16
|
* Make sure two Uint8Arrays are deeply equivalent
|
|
17
17
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Go through each expected RP ID and try to find one that matches. Returns the unhashed RP ID
|
|
3
4
|
* that matched the hash in the response.
|
|
4
5
|
*
|
|
5
6
|
* Raises an `UnexpectedRPIDHash` error if no match is found
|
|
6
7
|
*/
|
|
7
|
-
export declare function matchExpectedRPID(rpIDHash:
|
|
8
|
+
export declare function matchExpectedRPID(rpIDHash: Uint8Array_, expectedRPIDs: string[]): Promise<string>;
|
|
8
9
|
//# sourceMappingURL=matchExpectedRPID.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchExpectedRPID.d.ts","sourceRoot":"","sources":["../../src/helpers/matchExpectedRPID.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"matchExpectedRPID.d.ts","sourceRoot":"","sources":["../../src/helpers/matchExpectedRPID.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,WAAW,EACrB,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AuthenticationExtensionsAuthenticatorOutputs } from './decodeAuthenticatorExtensions.js';
|
|
1
|
+
import { type AuthenticationExtensionsAuthenticatorOutputs } from './decodeAuthenticatorExtensions.js';
|
|
2
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Make sense of the authData buffer contained in an Attestation
|
|
4
5
|
*/
|
|
5
|
-
export declare function parseAuthenticatorData(authData:
|
|
6
|
+
export declare function parseAuthenticatorData(authData: Uint8Array_): ParsedAuthenticatorData;
|
|
6
7
|
export type ParsedAuthenticatorData = {
|
|
7
|
-
rpIdHash:
|
|
8
|
-
flagsBuf:
|
|
8
|
+
rpIdHash: Uint8Array_;
|
|
9
|
+
flagsBuf: Uint8Array_;
|
|
9
10
|
flags: {
|
|
10
11
|
up: boolean;
|
|
11
12
|
uv: boolean;
|
|
@@ -16,12 +17,12 @@ export type ParsedAuthenticatorData = {
|
|
|
16
17
|
flagsInt: number;
|
|
17
18
|
};
|
|
18
19
|
counter: number;
|
|
19
|
-
counterBuf:
|
|
20
|
-
aaguid?:
|
|
21
|
-
credentialID?:
|
|
22
|
-
credentialPublicKey?:
|
|
20
|
+
counterBuf: Uint8Array_;
|
|
21
|
+
aaguid?: Uint8Array_;
|
|
22
|
+
credentialID?: Uint8Array_;
|
|
23
|
+
credentialPublicKey?: Uint8Array_;
|
|
23
24
|
extensionsData?: AuthenticationExtensionsAuthenticatorOutputs;
|
|
24
|
-
extensionsDataBuffer?:
|
|
25
|
+
extensionsDataBuffer?: Uint8Array_;
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Make it possible to stub the return value during testing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseAuthenticatorData.d.ts","sourceRoot":"","sources":["../../src/helpers/parseAuthenticatorData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4CAA4C,
|
|
1
|
+
{"version":3,"file":"parseAuthenticatorData.d.ts","sourceRoot":"","sources":["../../src/helpers/parseAuthenticatorData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4CAA4C,EAElD,MAAM,oCAAoC,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,WAAW,GACpB,uBAAuB,CAwHzB;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO,CAAC;QACZ,EAAE,EAAE,OAAO,CAAC;QACZ,EAAE,EAAE,OAAO,CAAC;QACZ,EAAE,EAAE,OAAO,CAAC;QACZ,EAAE,EAAE,OAAO,CAAC;QACZ,EAAE,EAAE,OAAO,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,cAAc,CAAC,EAAE,4CAA4C,CAAC;IAC9D,oBAAoB,CAAC,EAAE,WAAW,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC;sBACzB,uBAAuB;CAC1C,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { COSEALG } from './cose.js';
|
|
1
|
+
import type { COSEALG } from './cose.js';
|
|
2
|
+
import type { Uint8Array_ } from '../types/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Returns hash digest of the given data, using the given algorithm when provided. Defaults to using
|
|
4
5
|
* SHA-256.
|
|
5
6
|
*/
|
|
6
|
-
export declare function toHash(data:
|
|
7
|
+
export declare function toHash(data: Uint8Array_ | string, algorithm?: COSEALG): Promise<Uint8Array_>;
|
|
7
8
|
//# sourceMappingURL=toHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toHash.d.ts","sourceRoot":"","sources":["../../src/helpers/toHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"toHash.d.ts","sourceRoot":"","sources":["../../src/helpers/toHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;GAGG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,WAAW,GAAG,MAAM,EAC1B,SAAS,GAAE,OAAY,GACtB,OAAO,CAAC,WAAW,CAAC,CAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateCertificatePath.d.ts","sourceRoot":"","sources":["../../src/helpers/validateCertificatePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateCertificatePath.d.ts","sourceRoot":"","sources":["../../src/helpers/validateCertificatePath.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EAAE,EACrB,eAAe,GAAE,MAAM,EAAO,GAC7B,OAAO,CAAC,OAAO,CAAC,CA6HlB"}
|