@simplewebauthn/server 10.0.1 → 11.0.0-alpha3
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/README.md +14 -6
- package/esm/authentication/generateAuthenticationOptions.d.ts +2 -1
- package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/esm/authentication/verifyAuthenticationResponse.d.ts +4 -3
- package/esm/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- package/esm/authentication/verifyAuthenticationResponse.js +7 -7
- package/esm/helpers/convertAAGUIDToString.d.ts +1 -0
- package/esm/helpers/convertAAGUIDToString.d.ts.map +1 -0
- package/esm/helpers/convertAAGUIDToString.js +4 -4
- package/esm/helpers/convertCOSEtoPKCS.d.ts +1 -0
- package/esm/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
- package/esm/helpers/convertCertBufferToPEM.d.ts +2 -1
- package/esm/helpers/convertCertBufferToPEM.d.ts.map +1 -0
- package/esm/helpers/convertPEMToBytes.d.ts +1 -0
- package/esm/helpers/convertPEMToBytes.d.ts.map +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
- package/esm/helpers/convertX509PublicKeyToCOSE.js +4 -1
- package/esm/helpers/cose.d.ts +1 -0
- package/esm/helpers/cose.d.ts.map +1 -0
- package/esm/helpers/decodeAttestationObject.d.ts +1 -0
- package/esm/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts +5 -14
- package/esm/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/esm/helpers/decodeClientDataJSON.d.ts +2 -1
- package/esm/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/esm/helpers/decodeCredentialPublicKey.d.ts +1 -0
- package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/esm/helpers/fetch.d.ts +1 -0
- package/esm/helpers/fetch.d.ts.map +1 -0
- package/esm/helpers/fetch.js +1 -1
- package/esm/helpers/generateChallenge.d.ts +1 -0
- package/esm/helpers/generateChallenge.d.ts.map +1 -0
- package/esm/helpers/generateUserID.d.ts +1 -0
- package/esm/helpers/generateUserID.d.ts.map +1 -0
- package/esm/helpers/getCertificateInfo.d.ts +2 -1
- package/esm/helpers/getCertificateInfo.d.ts.map +1 -0
- package/esm/helpers/getCertificateInfo.js +2 -1
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.d.ts.map +1 -0
- package/esm/helpers/isCertRevoked.d.ts +2 -1
- package/esm/helpers/isCertRevoked.d.ts.map +1 -0
- package/esm/helpers/isCertRevoked.js +2 -1
- package/esm/helpers/iso/index.d.ts +1 -0
- package/esm/helpers/iso/index.d.ts.map +1 -0
- package/esm/helpers/iso/isoBase64URL.d.ts +2 -1
- package/esm/helpers/iso/isoBase64URL.d.ts.map +1 -0
- package/esm/helpers/iso/isoBase64URL.js +1 -1
- package/esm/helpers/iso/isoCBOR.d.ts +2 -1
- package/esm/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/esm/helpers/iso/isoCBOR.js +1 -1
- package/esm/helpers/iso/isoCrypto/digest.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
- package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/importKey.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/index.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/structs.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/unwrapEC2Signature.js +2 -1
- package/esm/helpers/iso/isoCrypto/verify.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
- package/esm/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
- package/esm/helpers/iso/isoUint8Array.d.ts +1 -0
- package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/esm/helpers/logging.d.ts +1 -0
- package/esm/helpers/logging.d.ts.map +1 -0
- package/esm/helpers/logging.js +0 -1
- package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
- package/esm/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
- package/esm/helpers/matchExpectedRPID.d.ts +1 -0
- package/esm/helpers/matchExpectedRPID.d.ts.map +1 -0
- package/esm/helpers/parseAuthenticatorData.d.ts +1 -0
- package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/esm/helpers/parseAuthenticatorData.js +6 -6
- package/esm/helpers/parseBackupFlags.d.ts +2 -1
- package/esm/helpers/parseBackupFlags.d.ts.map +1 -0
- package/esm/helpers/toHash.d.ts +1 -0
- package/esm/helpers/toHash.d.ts.map +1 -0
- package/esm/helpers/validateCertificatePath.d.ts +1 -0
- package/esm/helpers/validateCertificatePath.d.ts.map +1 -0
- package/esm/helpers/validateCertificatePath.js +1 -1
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts +7 -0
- package/esm/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/esm/helpers/validateExtFIDOGenCEAAGUID.js +34 -0
- package/esm/helpers/verifySignature.d.ts +1 -0
- package/esm/helpers/verifySignature.d.ts.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/metadata/mdsTypes.d.ts +2 -1
- package/esm/metadata/mdsTypes.d.ts.map +1 -0
- package/esm/metadata/parseJWT.d.ts +1 -0
- package/esm/metadata/parseJWT.d.ts.map +1 -0
- package/esm/metadata/verifyAttestationWithMetadata.d.ts +2 -1
- package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
- package/esm/metadata/verifyJWT.d.ts +1 -0
- package/esm/metadata/verifyJWT.d.ts.map +1 -0
- package/esm/registration/generateRegistrationOptions.d.ts +2 -1
- package/esm/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/constants.d.ts +1 -0
- package/esm/registration/verifications/tpm/constants.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/constants.js +8 -4
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
- package/esm/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/parsePubArea.d.ts +1 -0
- package/esm/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
- package/esm/registration/verifications/tpm/verifyAttestationTPM.js +11 -3
- package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidKey.js +3 -1
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationApple.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationApple.js +2 -1
- package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.d.ts +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
- package/esm/registration/verifications/verifyAttestationPacked.js +10 -3
- package/esm/registration/verifyRegistrationResponse.d.ts +5 -4
- package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -0
- package/esm/registration/verifyRegistrationResponse.js +11 -7
- package/esm/services/defaultRootCerts/android-key.d.ts +1 -0
- package/esm/services/defaultRootCerts/android-key.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/android-safetynet.d.ts +1 -0
- package/esm/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/apple.d.ts +1 -0
- package/esm/services/defaultRootCerts/apple.d.ts.map +1 -0
- package/esm/services/defaultRootCerts/mds.d.ts +1 -0
- package/esm/services/defaultRootCerts/mds.d.ts.map +1 -0
- package/esm/services/metadataService.d.ts +19 -4
- package/esm/services/metadataService.d.ts.map +1 -0
- package/esm/services/metadataService.js +8 -3
- package/esm/services/settingsService.d.ts +17 -14
- package/esm/services/settingsService.d.ts.map +1 -0
- package/esm/services/settingsService.js +14 -0
- package/package.json +29 -33
- package/script/authentication/generateAuthenticationOptions.d.ts +2 -1
- package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -0
- package/script/authentication/generateAuthenticationOptions.js +1 -2
- package/script/authentication/verifyAuthenticationResponse.d.ts +4 -3
- package/script/authentication/verifyAuthenticationResponse.d.ts.map +1 -0
- package/script/authentication/verifyAuthenticationResponse.js +8 -9
- package/script/helpers/convertAAGUIDToString.d.ts +1 -0
- package/script/helpers/convertAAGUIDToString.d.ts.map +1 -0
- package/script/helpers/convertAAGUIDToString.js +5 -6
- package/script/helpers/convertCOSEtoPKCS.d.ts +1 -0
- package/script/helpers/convertCOSEtoPKCS.d.ts.map +1 -0
- package/script/helpers/convertCOSEtoPKCS.js +1 -2
- package/script/helpers/convertCertBufferToPEM.d.ts +2 -1
- package/script/helpers/convertCertBufferToPEM.d.ts.map +1 -0
- package/script/helpers/convertCertBufferToPEM.js +1 -2
- package/script/helpers/convertPEMToBytes.d.ts +1 -0
- package/script/helpers/convertPEMToBytes.d.ts.map +1 -0
- package/script/helpers/convertPEMToBytes.js +1 -2
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts +1 -0
- package/script/helpers/convertX509PublicKeyToCOSE.d.ts.map +1 -0
- package/script/helpers/convertX509PublicKeyToCOSE.js +11 -9
- package/script/helpers/cose.d.ts +1 -0
- package/script/helpers/cose.d.ts.map +1 -0
- package/script/helpers/cose.js +11 -11
- package/script/helpers/decodeAttestationObject.d.ts +1 -0
- package/script/helpers/decodeAttestationObject.d.ts.map +1 -0
- package/script/helpers/decodeAttestationObject.js +2 -2
- package/script/helpers/decodeAuthenticatorExtensions.d.ts +5 -14
- package/script/helpers/decodeAuthenticatorExtensions.d.ts.map +1 -0
- package/script/helpers/decodeAuthenticatorExtensions.js +1 -2
- package/script/helpers/decodeClientDataJSON.d.ts +2 -1
- package/script/helpers/decodeClientDataJSON.d.ts.map +1 -0
- package/script/helpers/decodeClientDataJSON.js +2 -2
- package/script/helpers/decodeCredentialPublicKey.d.ts +1 -0
- package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -0
- package/script/helpers/decodeCredentialPublicKey.js +2 -2
- package/script/helpers/fetch.d.ts +1 -0
- package/script/helpers/fetch.d.ts.map +1 -0
- package/script/helpers/fetch.js +4 -4
- package/script/helpers/generateChallenge.d.ts +1 -0
- package/script/helpers/generateChallenge.d.ts.map +1 -0
- package/script/helpers/generateChallenge.js +2 -2
- package/script/helpers/generateUserID.d.ts +1 -0
- package/script/helpers/generateUserID.d.ts.map +1 -0
- package/script/helpers/generateUserID.js +2 -2
- package/script/helpers/getCertificateInfo.d.ts +2 -1
- package/script/helpers/getCertificateInfo.d.ts.map +1 -0
- package/script/helpers/getCertificateInfo.js +6 -6
- package/script/helpers/index.d.ts +1 -0
- package/script/helpers/index.d.ts.map +1 -0
- package/script/helpers/isCertRevoked.d.ts +2 -1
- package/script/helpers/isCertRevoked.d.ts.map +1 -0
- package/script/helpers/isCertRevoked.js +10 -10
- package/script/helpers/iso/index.d.ts +1 -0
- package/script/helpers/iso/index.d.ts.map +1 -0
- package/script/helpers/iso/isoBase64URL.d.ts +2 -1
- package/script/helpers/iso/isoBase64URL.d.ts.map +1 -0
- package/script/helpers/iso/isoBase64URL.js +20 -18
- package/script/helpers/iso/isoCBOR.d.ts +2 -1
- package/script/helpers/iso/isoCBOR.d.ts.map +1 -0
- package/script/helpers/iso/isoCBOR.js +28 -6
- package/script/helpers/iso/isoCrypto/digest.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/digest.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/digest.js +1 -2
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/getRandomValues.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/getRandomValues.js +1 -2
- package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts +2 -1
- package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/getWebCrypto.js +2 -2
- package/script/helpers/iso/isoCrypto/importKey.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/importKey.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/importKey.js +1 -2
- package/script/helpers/iso/isoCrypto/index.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/index.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.js +1 -2
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.js +1 -2
- package/script/helpers/iso/isoCrypto/structs.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/structs.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/unwrapEC2Signature.js +4 -4
- package/script/helpers/iso/isoCrypto/verify.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verify.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verify.js +1 -2
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyEC2.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyEC2.js +1 -2
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyOKP.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyOKP.js +1 -2
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts +1 -0
- package/script/helpers/iso/isoCrypto/verifyRSA.d.ts.map +1 -0
- package/script/helpers/iso/isoCrypto/verifyRSA.js +1 -2
- package/script/helpers/iso/isoUint8Array.d.ts +1 -0
- package/script/helpers/iso/isoUint8Array.d.ts.map +1 -0
- package/script/helpers/iso/isoUint8Array.js +8 -9
- package/script/helpers/logging.d.ts +1 -0
- package/script/helpers/logging.d.ts.map +1 -0
- package/script/helpers/logging.js +2 -4
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts +1 -0
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.d.ts.map +1 -0
- package/script/helpers/mapX509SignatureAlgToCOSEAlg.js +1 -2
- package/script/helpers/matchExpectedRPID.d.ts +1 -0
- package/script/helpers/matchExpectedRPID.d.ts.map +1 -0
- package/script/helpers/matchExpectedRPID.js +1 -2
- package/script/helpers/parseAuthenticatorData.d.ts +1 -0
- package/script/helpers/parseAuthenticatorData.d.ts.map +1 -0
- package/script/helpers/parseAuthenticatorData.js +8 -8
- package/script/helpers/parseBackupFlags.d.ts +2 -1
- package/script/helpers/parseBackupFlags.d.ts.map +1 -0
- package/script/helpers/parseBackupFlags.js +2 -2
- package/script/helpers/toHash.d.ts +1 -0
- package/script/helpers/toHash.d.ts.map +1 -0
- package/script/helpers/toHash.js +1 -2
- package/script/helpers/validateCertificatePath.d.ts +1 -0
- package/script/helpers/validateCertificatePath.d.ts.map +1 -0
- package/script/helpers/validateCertificatePath.js +3 -4
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts +7 -0
- package/script/helpers/validateExtFIDOGenCEAAGUID.d.ts.map +1 -0
- package/script/helpers/validateExtFIDOGenCEAAGUID.js +37 -0
- package/script/helpers/verifySignature.d.ts +1 -0
- package/script/helpers/verifySignature.d.ts.map +1 -0
- package/script/helpers/verifySignature.js +2 -2
- package/script/index.d.ts +1 -0
- package/script/index.d.ts.map +1 -0
- package/script/metadata/mdsTypes.d.ts +2 -1
- package/script/metadata/mdsTypes.d.ts.map +1 -0
- package/script/metadata/parseJWT.d.ts +1 -0
- package/script/metadata/parseJWT.d.ts.map +1 -0
- package/script/metadata/parseJWT.js +1 -2
- package/script/metadata/verifyAttestationWithMetadata.d.ts +2 -1
- package/script/metadata/verifyAttestationWithMetadata.d.ts.map +1 -0
- package/script/metadata/verifyAttestationWithMetadata.js +2 -2
- package/script/metadata/verifyJWT.d.ts +1 -0
- package/script/metadata/verifyJWT.d.ts.map +1 -0
- package/script/metadata/verifyJWT.js +1 -2
- package/script/registration/generateRegistrationOptions.d.ts +2 -1
- package/script/registration/generateRegistrationOptions.d.ts.map +1 -0
- package/script/registration/generateRegistrationOptions.js +2 -2
- package/script/registration/verifications/tpm/constants.d.ts +1 -0
- package/script/registration/verifications/tpm/constants.d.ts.map +1 -0
- package/script/registration/verifications/tpm/constants.js +8 -4
- package/script/registration/verifications/tpm/parseCertInfo.d.ts +1 -0
- package/script/registration/verifications/tpm/parseCertInfo.d.ts.map +1 -0
- package/script/registration/verifications/tpm/parseCertInfo.js +1 -2
- package/script/registration/verifications/tpm/parsePubArea.d.ts +1 -0
- package/script/registration/verifications/tpm/parsePubArea.d.ts.map +1 -0
- package/script/registration/verifications/tpm/parsePubArea.js +1 -2
- package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts +1 -0
- package/script/registration/verifications/tpm/verifyAttestationTPM.d.ts.map +1 -0
- package/script/registration/verifications/tpm/verifyAttestationTPM.js +17 -10
- package/script/registration/verifications/verifyAttestationAndroidKey.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationAndroidKey.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationAndroidKey.js +7 -6
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationAndroidSafetyNet.js +1 -2
- package/script/registration/verifications/verifyAttestationApple.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationApple.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationApple.js +4 -4
- package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationFIDOU2F.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationFIDOU2F.js +1 -2
- package/script/registration/verifications/verifyAttestationPacked.d.ts +1 -0
- package/script/registration/verifications/verifyAttestationPacked.d.ts.map +1 -0
- package/script/registration/verifications/verifyAttestationPacked.js +11 -5
- package/script/registration/verifyRegistrationResponse.d.ts +5 -4
- package/script/registration/verifyRegistrationResponse.d.ts.map +1 -0
- package/script/registration/verifyRegistrationResponse.js +12 -9
- package/script/services/defaultRootCerts/android-key.d.ts +1 -0
- package/script/services/defaultRootCerts/android-key.d.ts.map +1 -0
- package/script/services/defaultRootCerts/android-safetynet.d.ts +1 -0
- package/script/services/defaultRootCerts/android-safetynet.d.ts.map +1 -0
- package/script/services/defaultRootCerts/apple.d.ts +1 -0
- package/script/services/defaultRootCerts/apple.d.ts.map +1 -0
- package/script/services/defaultRootCerts/mds.d.ts +1 -0
- package/script/services/defaultRootCerts/mds.d.ts.map +1 -0
- package/script/services/metadataService.d.ts +19 -4
- package/script/services/metadataService.d.ts.map +1 -0
- package/script/services/metadataService.js +8 -3
- package/script/services/settingsService.d.ts +17 -14
- package/script/services/settingsService.d.ts.map +1 -0
- package/script/services/settingsService.js +14 -0
- package/esm/deps.d.ts +0 -9
- package/esm/deps.js +0 -12
- package/script/deps.d.ts +0 -9
- package/script/deps.js +0 -68
package/script/helpers/cose.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.COSEALG = exports.COSECRV = exports.COSEKTY = exports.COSEKEYS = void 0;
|
|
4
|
+
exports.isCOSEPublicKeyOKP = isCOSEPublicKeyOKP;
|
|
5
|
+
exports.isCOSEPublicKeyEC2 = isCOSEPublicKeyEC2;
|
|
6
|
+
exports.isCOSEPublicKeyRSA = isCOSEPublicKeyRSA;
|
|
7
|
+
exports.isCOSEKty = isCOSEKty;
|
|
8
|
+
exports.isCOSECrv = isCOSECrv;
|
|
9
|
+
exports.isCOSEAlg = isCOSEAlg;
|
|
4
10
|
function isCOSEPublicKeyOKP(cosePublicKey) {
|
|
5
11
|
const kty = cosePublicKey.get(COSEKEYS.kty);
|
|
6
12
|
return isCOSEKty(kty) && kty === COSEKTY.OKP;
|
|
7
13
|
}
|
|
8
|
-
exports.isCOSEPublicKeyOKP = isCOSEPublicKeyOKP;
|
|
9
14
|
function isCOSEPublicKeyEC2(cosePublicKey) {
|
|
10
15
|
const kty = cosePublicKey.get(COSEKEYS.kty);
|
|
11
16
|
return isCOSEKty(kty) && kty === COSEKTY.EC2;
|
|
12
17
|
}
|
|
13
|
-
exports.isCOSEPublicKeyEC2 = isCOSEPublicKeyEC2;
|
|
14
18
|
function isCOSEPublicKeyRSA(cosePublicKey) {
|
|
15
19
|
const kty = cosePublicKey.get(COSEKEYS.kty);
|
|
16
20
|
return isCOSEKty(kty) && kty === COSEKTY.RSA;
|
|
17
21
|
}
|
|
18
|
-
exports.isCOSEPublicKeyRSA = isCOSEPublicKeyRSA;
|
|
19
22
|
/**
|
|
20
23
|
* COSE Keys
|
|
21
24
|
*
|
|
@@ -31,7 +34,7 @@ var COSEKEYS;
|
|
|
31
34
|
COSEKEYS[COSEKEYS["y"] = -3] = "y";
|
|
32
35
|
COSEKEYS[COSEKEYS["n"] = -1] = "n";
|
|
33
36
|
COSEKEYS[COSEKEYS["e"] = -2] = "e";
|
|
34
|
-
})(COSEKEYS
|
|
37
|
+
})(COSEKEYS || (exports.COSEKEYS = COSEKEYS = {}));
|
|
35
38
|
/**
|
|
36
39
|
* COSE Key Types
|
|
37
40
|
*
|
|
@@ -42,11 +45,10 @@ var COSEKTY;
|
|
|
42
45
|
COSEKTY[COSEKTY["OKP"] = 1] = "OKP";
|
|
43
46
|
COSEKTY[COSEKTY["EC2"] = 2] = "EC2";
|
|
44
47
|
COSEKTY[COSEKTY["RSA"] = 3] = "RSA";
|
|
45
|
-
})(COSEKTY
|
|
48
|
+
})(COSEKTY || (exports.COSEKTY = COSEKTY = {}));
|
|
46
49
|
function isCOSEKty(kty) {
|
|
47
50
|
return Object.values(COSEKTY).indexOf(kty) >= 0;
|
|
48
51
|
}
|
|
49
|
-
exports.isCOSEKty = isCOSEKty;
|
|
50
52
|
/**
|
|
51
53
|
* COSE Curves
|
|
52
54
|
*
|
|
@@ -59,11 +61,10 @@ var COSECRV;
|
|
|
59
61
|
COSECRV[COSECRV["P521"] = 3] = "P521";
|
|
60
62
|
COSECRV[COSECRV["ED25519"] = 6] = "ED25519";
|
|
61
63
|
COSECRV[COSECRV["SECP256K1"] = 8] = "SECP256K1";
|
|
62
|
-
})(COSECRV
|
|
64
|
+
})(COSECRV || (exports.COSECRV = COSECRV = {}));
|
|
63
65
|
function isCOSECrv(crv) {
|
|
64
66
|
return Object.values(COSECRV).indexOf(crv) >= 0;
|
|
65
67
|
}
|
|
66
|
-
exports.isCOSECrv = isCOSECrv;
|
|
67
68
|
/**
|
|
68
69
|
* COSE Algorithms
|
|
69
70
|
*
|
|
@@ -83,8 +84,7 @@ var COSEALG;
|
|
|
83
84
|
COSEALG[COSEALG["RS384"] = -258] = "RS384";
|
|
84
85
|
COSEALG[COSEALG["RS512"] = -259] = "RS512";
|
|
85
86
|
COSEALG[COSEALG["RS1"] = -65535] = "RS1";
|
|
86
|
-
})(COSEALG
|
|
87
|
+
})(COSEALG || (exports.COSEALG = COSEALG = {}));
|
|
87
88
|
function isCOSEAlg(alg) {
|
|
88
89
|
return Object.values(COSEALG).indexOf(alg) >= 0;
|
|
89
90
|
}
|
|
90
|
-
exports.isCOSEAlg = isCOSEAlg;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeAttestationObject.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAttestationObject.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,UAAU,GAC5B,iBAAiB,CAInB;AAED,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,KAAK,GACL,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,iBAAiB,CAAC;IACnC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IACxC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAGF,eAAO,MAAM,iCAAiC;sBAC1B,iBAAiB;CACpC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._decodeAttestationObjectInternals =
|
|
3
|
+
exports._decodeAttestationObjectInternals = void 0;
|
|
4
|
+
exports.decodeAttestationObject = decodeAttestationObject;
|
|
4
5
|
const index_js_1 = require("./iso/index.js");
|
|
5
6
|
/**
|
|
6
7
|
* Convert an AttestationObject buffer to a proper object
|
|
@@ -10,7 +11,6 @@ const index_js_1 = require("./iso/index.js");
|
|
|
10
11
|
function decodeAttestationObject(attestationObject) {
|
|
11
12
|
return exports._decodeAttestationObjectInternals.stubThis(index_js_1.isoCBOR.decodeFirst(attestationObject));
|
|
12
13
|
}
|
|
13
|
-
exports.decodeAttestationObject = decodeAttestationObject;
|
|
14
14
|
// Make it possible to stub the return value during testing
|
|
15
15
|
exports._decodeAttestationObjectInternals = {
|
|
16
16
|
stubThis: (value) => value,
|
|
@@ -4,17 +4,8 @@
|
|
|
4
4
|
* @param extensionData Authenticator Extension Data buffer
|
|
5
5
|
*/
|
|
6
6
|
export declare function decodeAuthenticatorExtensions(extensionData: Uint8Array): AuthenticationExtensionsAuthenticatorOutputs | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
dpk?: Uint8Array;
|
|
13
|
-
sig?: string;
|
|
14
|
-
nonce?: Uint8Array;
|
|
15
|
-
scope?: Uint8Array;
|
|
16
|
-
aaguid?: Uint8Array;
|
|
17
|
-
};
|
|
18
|
-
export type UVMAuthenticatorOutput = {
|
|
19
|
-
uvm?: Uint8Array[];
|
|
20
|
-
};
|
|
7
|
+
/**
|
|
8
|
+
* Attempt to support authenticator extensions we might not know about in WebAuthn
|
|
9
|
+
*/
|
|
10
|
+
export type AuthenticationExtensionsAuthenticatorOutputs = unknown;
|
|
11
|
+
//# sourceMappingURL=decodeAuthenticatorExtensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeAuthenticatorExtensions.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAuthenticatorExtensions.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,UAAU,GACxB,4CAA4C,GAAG,SAAS,CAU1D;AAED;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,OAAO,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeAuthenticatorExtensions =
|
|
3
|
+
exports.decodeAuthenticatorExtensions = decodeAuthenticatorExtensions;
|
|
4
4
|
const index_js_1 = require("./iso/index.js");
|
|
5
5
|
/**
|
|
6
6
|
* Convert authenticator extension data buffer to a proper object
|
|
@@ -18,7 +18,6 @@ function decodeAuthenticatorExtensions(extensionData) {
|
|
|
18
18
|
}
|
|
19
19
|
return convertMapToObjectDeep(toCBOR);
|
|
20
20
|
}
|
|
21
|
-
exports.decodeAuthenticatorExtensions = decodeAuthenticatorExtensions;
|
|
22
21
|
/**
|
|
23
22
|
* CBOR-encoded extensions can be deeply-nested Maps, which are too deep for a simple
|
|
24
23
|
* `Object.entries()`. This method will recursively make sure that all Maps are converted into
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Base64URLString } from '
|
|
1
|
+
import type { Base64URLString } from '@simplewebauthn/types';
|
|
2
2
|
/**
|
|
3
3
|
* Decode an authenticator's base64url-encoded clientDataJSON to JSON
|
|
4
4
|
*/
|
|
@@ -16,3 +16,4 @@ export type ClientDataJSON = {
|
|
|
16
16
|
export declare const _decodeClientDataJSONInternals: {
|
|
17
17
|
stubThis: (value: ClientDataJSON) => ClientDataJSON;
|
|
18
18
|
};
|
|
19
|
+
//# sourceMappingURL=decodeClientDataJSON.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeClientDataJSON.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeClientDataJSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAK1E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;KACnD,CAAC;CACH,CAAC;AAGF,eAAO,MAAM,8BAA8B;sBACvB,cAAc;CACjC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._decodeClientDataJSONInternals =
|
|
3
|
+
exports._decodeClientDataJSONInternals = void 0;
|
|
4
|
+
exports.decodeClientDataJSON = decodeClientDataJSON;
|
|
4
5
|
const index_js_1 = require("./iso/index.js");
|
|
5
6
|
/**
|
|
6
7
|
* Decode an authenticator's base64url-encoded clientDataJSON to JSON
|
|
@@ -10,7 +11,6 @@ function decodeClientDataJSON(data) {
|
|
|
10
11
|
const clientData = JSON.parse(toString);
|
|
11
12
|
return exports._decodeClientDataJSONInternals.stubThis(clientData);
|
|
12
13
|
}
|
|
13
|
-
exports.decodeClientDataJSON = decodeClientDataJSON;
|
|
14
14
|
// Make it possible to stub the return value during testing
|
|
15
15
|
exports._decodeClientDataJSONInternals = {
|
|
16
16
|
stubThis: (value) => value,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,UAAU,GACpB,aAAa,CAIf;AAGD,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._decodeCredentialPublicKeyInternals =
|
|
3
|
+
exports._decodeCredentialPublicKeyInternals = void 0;
|
|
4
|
+
exports.decodeCredentialPublicKey = decodeCredentialPublicKey;
|
|
4
5
|
const index_js_1 = require("./iso/index.js");
|
|
5
6
|
function decodeCredentialPublicKey(publicKey) {
|
|
6
7
|
return exports._decodeCredentialPublicKeyInternals.stubThis(index_js_1.isoCBOR.decodeFirst(publicKey));
|
|
7
8
|
}
|
|
8
|
-
exports.decodeCredentialPublicKey = decodeCredentialPublicKey;
|
|
9
9
|
// Make it possible to stub the return value during testing
|
|
10
10
|
exports._decodeCredentialPublicKeyInternals = {
|
|
11
11
|
stubThis: (value) => value,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpD;AAGD,eAAO,MAAM,eAAe;oBACV,MAAM;CACvB,CAAC"}
|
package/script/helpers/fetch.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._fetchInternals =
|
|
4
|
-
|
|
3
|
+
exports._fetchInternals = void 0;
|
|
4
|
+
exports.fetch = fetch;
|
|
5
|
+
const cross_fetch_1 = require("cross-fetch");
|
|
5
6
|
/**
|
|
6
7
|
* A simple method for requesting data via standard `fetch`. Should work
|
|
7
8
|
* across multiple runtimes.
|
|
@@ -9,8 +10,7 @@ const deps_js_1 = require("../deps.js");
|
|
|
9
10
|
function fetch(url) {
|
|
10
11
|
return exports._fetchInternals.stubThis(url);
|
|
11
12
|
}
|
|
12
|
-
exports.fetch = fetch;
|
|
13
13
|
// Make it possible to stub the return value during testing
|
|
14
14
|
exports._fetchInternals = {
|
|
15
|
-
stubThis: (url) => (0,
|
|
15
|
+
stubThis: (url) => (0, cross_fetch_1.fetch)(url),
|
|
16
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAc7D;AAGD,eAAO,MAAM,2BAA2B;sBACpB,UAAU;CAC7B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._generateChallengeInternals =
|
|
3
|
+
exports._generateChallengeInternals = void 0;
|
|
4
|
+
exports.generateChallenge = generateChallenge;
|
|
4
5
|
const index_js_1 = require("./iso/index.js");
|
|
5
6
|
/**
|
|
6
7
|
* Generate a suitably random value to be used as an attestation or assertion challenge
|
|
@@ -18,7 +19,6 @@ async function generateChallenge() {
|
|
|
18
19
|
await index_js_1.isoCrypto.getRandomValues(challenge);
|
|
19
20
|
return exports._generateChallengeInternals.stubThis(challenge);
|
|
20
21
|
}
|
|
21
|
-
exports.generateChallenge = generateChallenge;
|
|
22
22
|
// Make it possible to stub the return value during testing
|
|
23
23
|
exports._generateChallengeInternals = {
|
|
24
24
|
stubThis: (value) => value,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAU1D;AAGD,eAAO,MAAM,wBAAwB;sBACjB,UAAU;CAC7B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._generateUserIDInternals =
|
|
3
|
+
exports._generateUserIDInternals = void 0;
|
|
4
|
+
exports.generateUserID = generateUserID;
|
|
4
5
|
const index_js_1 = require("./iso/index.js");
|
|
5
6
|
/**
|
|
6
7
|
* Generate a suitably random value to be used as user ID
|
|
@@ -14,7 +15,6 @@ async function generateUserID() {
|
|
|
14
15
|
await index_js_1.isoCrypto.getRandomValues(newUserID);
|
|
15
16
|
return exports._generateUserIDInternals.stubThis(newUserID);
|
|
16
17
|
}
|
|
17
|
-
exports.generateUserID = generateUserID;
|
|
18
18
|
// Make it possible to stub the return value during testing
|
|
19
19
|
exports._generateUserIDInternals = {
|
|
20
20
|
stubThis: (value) => value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Certificate } from '
|
|
1
|
+
import { Certificate } from '@peculiar/asn1-x509';
|
|
2
2
|
export type CertificateInfo = {
|
|
3
3
|
issuer: Issuer;
|
|
4
4
|
subject: Subject;
|
|
@@ -29,3 +29,4 @@ type Subject = {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function getCertificateInfo(leafCertBuffer: Uint8Array): CertificateInfo;
|
|
31
31
|
export {};
|
|
32
|
+
//# sourceMappingURL=getCertificateInfo.d.ts.map
|
|
@@ -0,0 +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,UAAU,GACzB,eAAe,CA+CjB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCertificateInfo =
|
|
4
|
-
const
|
|
3
|
+
exports.getCertificateInfo = getCertificateInfo;
|
|
4
|
+
const asn1_schema_1 = require("@peculiar/asn1-schema");
|
|
5
|
+
const asn1_x509_1 = require("@peculiar/asn1-x509");
|
|
5
6
|
const issuerSubjectIDKey = {
|
|
6
7
|
'2.5.4.6': 'C',
|
|
7
8
|
'2.5.4.10': 'O',
|
|
@@ -14,7 +15,7 @@ const issuerSubjectIDKey = {
|
|
|
14
15
|
* @param pemCertificate Result from call to `convertASN1toPEM(x5c[0])`
|
|
15
16
|
*/
|
|
16
17
|
function getCertificateInfo(leafCertBuffer) {
|
|
17
|
-
const x509 =
|
|
18
|
+
const x509 = asn1_schema_1.AsnParser.parse(leafCertBuffer, asn1_x509_1.Certificate);
|
|
18
19
|
const parsedCert = x509.tbsCertificate;
|
|
19
20
|
// Issuer
|
|
20
21
|
const issuer = { combined: '' };
|
|
@@ -38,8 +39,8 @@ function getCertificateInfo(leafCertBuffer) {
|
|
|
38
39
|
if (parsedCert.extensions) {
|
|
39
40
|
// console.log(parsedCert.extensions);
|
|
40
41
|
for (const ext of parsedCert.extensions) {
|
|
41
|
-
if (ext.extnID ===
|
|
42
|
-
const basicConstraints =
|
|
42
|
+
if (ext.extnID === asn1_x509_1.id_ce_basicConstraints) {
|
|
43
|
+
const basicConstraints = asn1_schema_1.AsnParser.parse(ext.extnValue, asn1_x509_1.BasicConstraints);
|
|
43
44
|
basicConstraintsCA = basicConstraints.cA;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -54,7 +55,6 @@ function getCertificateInfo(leafCertBuffer) {
|
|
|
54
55
|
parsedCertificate: x509,
|
|
55
56
|
};
|
|
56
57
|
}
|
|
57
|
-
exports.getCertificateInfo = getCertificateInfo;
|
|
58
58
|
/**
|
|
59
59
|
* Stringify the parts of Issuer or Subject info for easier comparison of subject issuers with
|
|
60
60
|
* issuer subjects.
|
|
@@ -21,3 +21,4 @@ import type { ClientDataJSON } from './decodeClientDataJSON.js';
|
|
|
21
21
|
import type { COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA } from './cose.js';
|
|
22
22
|
import type { ParsedAuthenticatorData } from './parseAuthenticatorData.js';
|
|
23
23
|
export type { AttestationFormat, AttestationObject, AttestationStatement, CertificateInfo, ClientDataJSON, COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA, ParsedAuthenticatorData, };
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,MAAM,EACN,uBAAuB,EACvB,eAAe,GAChB,CAAC;AAEF,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,GACxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Certificate } from '
|
|
1
|
+
import { Certificate } from '@peculiar/asn1-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.
|
|
@@ -6,3 +6,4 @@ import { Certificate } from '../deps.js';
|
|
|
6
6
|
* CRL certificate structure referenced from https://tools.ietf.org/html/rfc5280#page-117
|
|
7
7
|
*/
|
|
8
8
|
export declare function isCertRevoked(cert: Certificate): Promise<boolean>;
|
|
9
|
+
//# sourceMappingURL=isCertRevoked.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isCertRevoked.d.ts","sourceRoot":"","sources":["../../src/helpers/isCertRevoked.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EAOZ,MAAM,qBAAqB,CAAC;AAgB7B;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAgHvE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCertRevoked =
|
|
4
|
-
const
|
|
3
|
+
exports.isCertRevoked = isCertRevoked;
|
|
4
|
+
const asn1_schema_1 = require("@peculiar/asn1-schema");
|
|
5
|
+
const asn1_x509_1 = require("@peculiar/asn1-x509");
|
|
5
6
|
const index_js_1 = require("./iso/index.js");
|
|
6
7
|
const fetch_js_1 = require("./fetch.js");
|
|
7
8
|
const cacheRevokedCerts = {};
|
|
@@ -20,14 +21,14 @@ async function isCertRevoked(cert) {
|
|
|
20
21
|
let extSubjectKeyID;
|
|
21
22
|
let extCRLDistributionPoints;
|
|
22
23
|
extensions.forEach((ext) => {
|
|
23
|
-
if (ext.extnID ===
|
|
24
|
-
extAuthorityKeyID =
|
|
24
|
+
if (ext.extnID === asn1_x509_1.id_ce_authorityKeyIdentifier) {
|
|
25
|
+
extAuthorityKeyID = asn1_schema_1.AsnParser.parse(ext.extnValue, asn1_x509_1.AuthorityKeyIdentifier);
|
|
25
26
|
}
|
|
26
|
-
else if (ext.extnID ===
|
|
27
|
-
extSubjectKeyID =
|
|
27
|
+
else if (ext.extnID === asn1_x509_1.id_ce_subjectKeyIdentifier) {
|
|
28
|
+
extSubjectKeyID = asn1_schema_1.AsnParser.parse(ext.extnValue, asn1_x509_1.SubjectKeyIdentifier);
|
|
28
29
|
}
|
|
29
|
-
else if (ext.extnID ===
|
|
30
|
-
extCRLDistributionPoints =
|
|
30
|
+
else if (ext.extnID === asn1_x509_1.id_ce_cRLDistributionPoints) {
|
|
31
|
+
extCRLDistributionPoints = asn1_schema_1.AsnParser.parse(ext.extnValue, asn1_x509_1.CRLDistributionPoints);
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
// Check to see if we've got cached info for the cert's CA
|
|
@@ -70,7 +71,7 @@ async function isCertRevoked(cert) {
|
|
|
70
71
|
}
|
|
71
72
|
let data;
|
|
72
73
|
try {
|
|
73
|
-
data =
|
|
74
|
+
data = asn1_schema_1.AsnParser.parse(certListBytes, asn1_x509_1.CertificateList);
|
|
74
75
|
}
|
|
75
76
|
catch (_err) {
|
|
76
77
|
// Something was malformed with the CRL, so pass
|
|
@@ -99,4 +100,3 @@ async function isCertRevoked(cert) {
|
|
|
99
100
|
}
|
|
100
101
|
return false;
|
|
101
102
|
}
|
|
102
|
-
exports.isCertRevoked = isCertRevoked;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Base64URLString } from '
|
|
1
|
+
import type { Base64URLString } from '@simplewebauthn/types';
|
|
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
|
|
@@ -40,3 +40,4 @@ export declare function isBase64URL(input: string): boolean;
|
|
|
40
40
|
* Remove optional padding from a base64url-encoded string
|
|
41
41
|
*/
|
|
42
42
|
export declare function trimPadding(input: Base64URLString): Base64URLString;
|
|
43
|
+
//# sourceMappingURL=isoBase64URL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,UAAU,CAGZ;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,UAAU,EAClB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAER;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"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
6
|
+
exports.toBuffer = toBuffer;
|
|
7
|
+
exports.fromBuffer = fromBuffer;
|
|
8
|
+
exports.toBase64 = toBase64;
|
|
9
|
+
exports.fromUTF8String = fromUTF8String;
|
|
10
|
+
exports.toUTF8String = toUTF8String;
|
|
11
|
+
exports.isBase64 = isBase64;
|
|
12
|
+
exports.isBase64URL = isBase64URL;
|
|
13
|
+
exports.trimPadding = trimPadding;
|
|
14
|
+
const base64_1 = __importDefault(require("@hexagon/base64"));
|
|
5
15
|
/**
|
|
6
16
|
* Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
|
|
7
17
|
* credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or
|
|
@@ -11,10 +21,9 @@ const deps_js_1 = require("../../deps.js");
|
|
|
11
21
|
* @param to (optional) The decoding to use, in case it's desirable to decode from base64 instead
|
|
12
22
|
*/
|
|
13
23
|
function toBuffer(base64urlString, from = 'base64url') {
|
|
14
|
-
const _buffer =
|
|
24
|
+
const _buffer = base64_1.default.toArrayBuffer(base64urlString, from === 'base64url');
|
|
15
25
|
return new Uint8Array(_buffer);
|
|
16
26
|
}
|
|
17
|
-
exports.toBuffer = toBuffer;
|
|
18
27
|
/**
|
|
19
28
|
* Encode the given array buffer into a Base64URL-encoded string. Ideal for converting various
|
|
20
29
|
* credential response ArrayBuffers to string for sending back to the server as JSON.
|
|
@@ -23,52 +32,45 @@ exports.toBuffer = toBuffer;
|
|
|
23
32
|
* @param to (optional) The encoding to use, in case it's desirable to encode to base64 instead
|
|
24
33
|
*/
|
|
25
34
|
function fromBuffer(buffer, to = 'base64url') {
|
|
26
|
-
return
|
|
35
|
+
return base64_1.default.fromArrayBuffer(buffer, to === 'base64url');
|
|
27
36
|
}
|
|
28
|
-
exports.fromBuffer = fromBuffer;
|
|
29
37
|
/**
|
|
30
38
|
* Convert a base64url string into base64
|
|
31
39
|
*/
|
|
32
40
|
function toBase64(base64urlString) {
|
|
33
|
-
const fromBase64Url =
|
|
34
|
-
const toBase64 =
|
|
41
|
+
const fromBase64Url = base64_1.default.toArrayBuffer(base64urlString, true);
|
|
42
|
+
const toBase64 = base64_1.default.fromArrayBuffer(fromBase64Url);
|
|
35
43
|
return toBase64;
|
|
36
44
|
}
|
|
37
|
-
exports.toBase64 = toBase64;
|
|
38
45
|
/**
|
|
39
46
|
* Encode a UTF-8 string to base64url
|
|
40
47
|
*/
|
|
41
48
|
function fromUTF8String(utf8String) {
|
|
42
|
-
return
|
|
49
|
+
return base64_1.default.fromString(utf8String, true);
|
|
43
50
|
}
|
|
44
|
-
exports.fromUTF8String = fromUTF8String;
|
|
45
51
|
/**
|
|
46
52
|
* Decode a base64url string into its original UTF-8 string
|
|
47
53
|
*/
|
|
48
54
|
function toUTF8String(base64urlString) {
|
|
49
|
-
return
|
|
55
|
+
return base64_1.default.toString(base64urlString, true);
|
|
50
56
|
}
|
|
51
|
-
exports.toUTF8String = toUTF8String;
|
|
52
57
|
/**
|
|
53
58
|
* Confirm that the string is encoded into base64
|
|
54
59
|
*/
|
|
55
60
|
function isBase64(input) {
|
|
56
|
-
return
|
|
61
|
+
return base64_1.default.validate(input, false);
|
|
57
62
|
}
|
|
58
|
-
exports.isBase64 = isBase64;
|
|
59
63
|
/**
|
|
60
64
|
* Confirm that the string is encoded into base64url, with support for optional padding
|
|
61
65
|
*/
|
|
62
66
|
function isBase64URL(input) {
|
|
63
67
|
// Trim padding characters from the string if present
|
|
64
68
|
input = trimPadding(input);
|
|
65
|
-
return
|
|
69
|
+
return base64_1.default.validate(input, true);
|
|
66
70
|
}
|
|
67
|
-
exports.isBase64URL = isBase64URL;
|
|
68
71
|
/**
|
|
69
72
|
* Remove optional padding from a base64url-encoded string
|
|
70
73
|
*/
|
|
71
74
|
function trimPadding(input) {
|
|
72
75
|
return input.replace(/=/g, '');
|
|
73
76
|
}
|
|
74
|
-
exports.trimPadding = trimPadding;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as tinyCbor from '@levischuck/tiny-cbor';
|
|
2
2
|
/**
|
|
3
3
|
* Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
|
|
4
4
|
*
|
|
@@ -21,3 +21,4 @@ export declare function decodeFirst<Type>(input: Uint8Array): Type;
|
|
|
21
21
|
* Encode data to CBOR
|
|
22
22
|
*/
|
|
23
23
|
export declare function encode(input: tinyCbor.CBORType): Uint8Array;
|
|
24
|
+
//# sourceMappingURL=isoCBOR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAQzD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAE3D"}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
26
|
+
exports.decodeFirst = decodeFirst;
|
|
27
|
+
exports.encode = encode;
|
|
28
|
+
const tinyCbor = __importStar(require("@levischuck/tiny-cbor"));
|
|
5
29
|
/**
|
|
6
30
|
* Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
|
|
7
31
|
*
|
|
@@ -22,15 +46,13 @@ const deps_js_1 = require("../../deps.js");
|
|
|
22
46
|
function decodeFirst(input) {
|
|
23
47
|
// Make a copy so we don't mutate the original
|
|
24
48
|
const _input = new Uint8Array(input);
|
|
25
|
-
const decoded =
|
|
49
|
+
const decoded = tinyCbor.decodePartialCBOR(_input, 0);
|
|
26
50
|
const [first] = decoded;
|
|
27
51
|
return first;
|
|
28
52
|
}
|
|
29
|
-
exports.decodeFirst = decodeFirst;
|
|
30
53
|
/**
|
|
31
54
|
* Encode data to CBOR
|
|
32
55
|
*/
|
|
33
56
|
function encode(input) {
|
|
34
|
-
return
|
|
57
|
+
return tinyCbor.encodeCBOR(input);
|
|
35
58
|
}
|
|
36
|
-
exports.encode = encode;
|
|
@@ -0,0 +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;AAIxC;;;;;GAKG;AACH,wBAAsB,MAAM,CAC1B,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,UAAU,CAAC,CAQrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.digest =
|
|
3
|
+
exports.digest = digest;
|
|
4
4
|
const mapCoseAlgToWebCryptoAlg_js_1 = require("./mapCoseAlgToWebCryptoAlg.js");
|
|
5
5
|
const getWebCrypto_js_1 = require("./getWebCrypto.js");
|
|
6
6
|
/**
|
|
@@ -15,4 +15,3 @@ async function digest(data, algorithm) {
|
|
|
15
15
|
const hashed = await WebCrypto.subtle.digest(subtleAlgorithm, data);
|
|
16
16
|
return new Uint8Array(hashed);
|
|
17
17
|
}
|
|
18
|
-
exports.digest = digest;
|