@@ -183,3 +183,11 @@ # node-tpm2 API Reference | ||
| ```typescript | ||
| type QuoteResult = { message: Buffer; signature: Buffer }; | ||
| type QuoteSigScheme = 'ecdsa' | 'rsassa' | 'rsapss'; | ||
| type QuoteHashAlg = 'sha1' | 'sha256' | 'sha384'; | ||
| type QuoteResult = { | ||
| message: Buffer; | ||
| signature: Buffer; | ||
| sigScheme: QuoteSigScheme; | ||
| hashAlg: QuoteHashAlg; | ||
| }; | ||
| ``` | ||
@@ -190,4 +198,15 @@ | ||
| | `message` | Raw **TPMS_ATTEST** structure from `TPM2_Quote` — send to your verifier for parsing | | ||
| | `signature` | ECDSA-SHA256 (Linux): **IEEE P1363** (64 bytes, r‖s) over `message`. RSASSA-SHA256 (Windows PCP RSA AK): raw RSA signature bytes from the TPM. | | ||
| | `signature` | Verify-ready signature bytes: **IEEE P1363** (64 bytes, r‖s) for ECDSA; modulus-sized RSA payload for RSASSA/RSAPSS | | ||
| | `sigScheme` | Signing scheme from the Quote **response** `TPMT_SIGNATURE` (not the Quote request or key type) | | ||
| | `hashAlg` | Hash algorithm from the Quote **response** `TPMT_SIGNATURE` — use with `sigScheme` to verify `signature` over `message` | | ||
| **Platform examples (response truth, not request intent):** | ||
| | Platform | Typical `sigScheme` | Typical `hashAlg` | | ||
| |----------|---------------------|-------------------| | ||
| | Linux TBS ECC AK | `ecdsa` | `sha256` | | ||
| | Windows PCP RSA AK (Intel PTT tested) | `rsassa` | `sha1` | | ||
| PCP quotes are requested with `TPM_ALG_NULL` (key default); the TPM responds with the key's baked-in scheme — **SHA-1 on tested Intel PTT**, not SHA-256. Do not infer `hashAlg` from key type or platform; read it from `QuoteResult`. | ||
| Also pass `akPublicDer` (from provisioning) and `pcrSelection` / `qualifyingData` to the verifier out-of-band. | ||
@@ -854,3 +873,3 @@ | ||
| | `attest.provisionAk` | TBS ECC P-256 AK, transient export | NCrypt PCP RSA-2048 persisted key | | ||
| | Quote crypto | ECDSA-SHA256 explicit | RSASSA-SHA256 (PCP default scheme) | | ||
| | Quote crypto | ECDSA-SHA256 (explicit request; response matches) | RSASSA-SHA1 on tested Intel PTT (PCP key default; read `sigScheme`/`hashAlg` from `QuoteResult`) | | ||
| | ActivateCredential | Full TBS policy path | NCrypt PCP ID activation | | ||
@@ -1032,4 +1051,4 @@ | EK certificate | NV indices via TBS | Same | | ||
| **TypeScript types** (from `index.d.ts`, not runtime exports): `TpmErrorCode`, `AkBlob`, `KeyBlob`, `QuoteOptions`, `QuoteResult`, `ReadPublicResult`, `ProvisionAkOptions`, `ProvisionAkResult`, `ActivateCredentialOptions`, `ActivateCredentialFlatOptions`, `KeyCreateOptions`, `SealOptions`, `TpmInfo`, `TpmHandle`, `KeyHandle`, `AkHandle`. | ||
| **TypeScript types** (from `index.d.ts`, not runtime exports): `TpmErrorCode`, `AkBlob`, `KeyBlob`, `QuoteOptions`, `QuoteResult`, `QuoteSigScheme`, `QuoteHashAlg`, `ReadPublicResult`, `ProvisionAkOptions`, `ProvisionAkResult`, `ActivateCredentialOptions`, `ActivateCredentialFlatOptions`, `KeyCreateOptions`, `SealOptions`, `TpmInfo`, `TpmHandle`, `KeyHandle`, `AkHandle`. | ||
| **Native-only** (used internally, not exported from package): `keyBlobPublicDer`. |
@@ -45,3 +45,3 @@ # Getting started | ||
| }); | ||
| // quote.message, quote.signature → send to verifier | ||
| // quote.message, quote.signature, quote.sigScheme, quote.hashAlg → send to verifier | ||
| ``` | ||
@@ -48,0 +48,0 @@ |
@@ -19,3 +19,3 @@ #!/usr/bin/env node | ||
| const { akPublicDer, akBlob } = await Tpm.provisionAk(); | ||
| const { message, signature } = await Tpm.quote({ | ||
| const quote = await Tpm.quote({ | ||
| akBlob, | ||
@@ -28,10 +28,15 @@ pcrSelection: [0, 7], | ||
| const key = tpmPublicKeyFromDer(akPublicDer); | ||
| const ok = verifyAttestationSignature(akPublicDer, message, signature); | ||
| const ok = verifyAttestationSignature(akPublicDer, quote.message, quote.signature, { | ||
| sigScheme: quote.sigScheme, | ||
| hashAlg: quote.hashAlg, | ||
| }); | ||
| console.log({ | ||
| keyType: key.asymmetricKeyType, | ||
| sigScheme: quote.sigScheme, | ||
| hashAlg: quote.hashAlg, | ||
| akPublicDerLen: akPublicDer.length, | ||
| messageLen: message.length, | ||
| sigLen: signature.length, | ||
| sigHexPrefix: signature.subarray(0, 8).toString('hex'), | ||
| messageLen: quote.message.length, | ||
| sigLen: quote.signature.length, | ||
| sigHexPrefix: quote.signature.subarray(0, 8).toString('hex'), | ||
| verify: ok, | ||
@@ -38,0 +43,0 @@ }); |
@@ -52,13 +52,31 @@ /** | ||
| /** Quote / attest: TPM signs hash(inner TPMS_ATTEST) — go-attestation / tpm2_checkquote model. */ | ||
| export function verifyAttestationSignature(publicKeyDer, message, signature) { | ||
| export function verifyAttestationSignature(publicKeyDer, message, signature, scheme) { | ||
| const { sigScheme, hashAlg } = scheme; | ||
| if (!sigScheme || !hashAlg) { | ||
| throw new Error('verifyAttestationSignature requires sigScheme and hashAlg from QuoteResult'); | ||
| } | ||
| const key = tpmPublicKeyFromDer(publicKeyDer); | ||
| if (key.asymmetricKeyType === 'rsa') { | ||
| if (sigScheme === 'ecdsa') { | ||
| const nodeHash = hashAlg === 'sha384' ? 'sha384' : 'sha256'; | ||
| return verify(nodeHash, message, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| } | ||
| if (sigScheme === 'rsassa') { | ||
| const hashName = | ||
| hashAlg === 'sha1' ? 'RSA-SHA1' : hashAlg === 'sha384' ? 'RSA-SHA384' : 'RSA-SHA256'; | ||
| const sig = padRsaSignature(signature); | ||
| for (const hashName of ['RSA-SHA256', 'RSA-SHA1']) { | ||
| if (verifyRsaPkcs1(key, hashName, message, sig)) return true; | ||
| if (verifyRsaPkcs1(key, hashName, tpm2bEncode(message), sig)) return true; | ||
| } | ||
| return false; | ||
| if (verifyRsaPkcs1(key, hashName, message, sig)) return true; | ||
| return verifyRsaPkcs1(key, hashName, tpm2bEncode(message), sig); | ||
| } | ||
| return verify('sha256', message, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| if (sigScheme === 'rsapss') { | ||
| const hashName = | ||
| hashAlg === 'sha1' ? 'RSA-SHA1' : hashAlg === 'sha384' ? 'RSA-SHA384' : 'RSA-SHA256'; | ||
| const sig = padRsaSignature(signature); | ||
| const verifier = createVerify(hashName); | ||
| verifier.update(message); | ||
| if (verifier.verify({ key, padding: constants.RSA_PKCS1_PSS_PADDING }, sig)) return true; | ||
| const wrapped = createVerify(hashName); | ||
| wrapped.update(tpm2bEncode(message)); | ||
| return wrapped.verify({ key, padding: constants.RSA_PKCS1_PSS_PADDING }, sig); | ||
| } | ||
| return false; | ||
| } | ||
@@ -65,0 +83,0 @@ |
+6
-0
@@ -45,5 +45,11 @@ export declare class TpmError extends Error { | ||
| export declare type QuoteSigScheme = 'ecdsa' | 'rsassa' | 'rsapss'; | ||
| export declare type QuoteHashAlg = 'sha1' | 'sha256' | 'sha384'; | ||
| export declare type QuoteResult = { | ||
| message: Buffer; | ||
| signature: Buffer; | ||
| sigScheme: QuoteSigScheme; | ||
| hashAlg: QuoteHashAlg; | ||
| }; | ||
@@ -50,0 +56,0 @@ |
+156
-156
@@ -80,6 +80,6 @@ // prettier-ignore | ||
| const bindingPackageVersion = require('node-tpm2-android-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -89,6 +89,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -98,4 +98,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -115,6 +115,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-android-arm-eabi/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -124,6 +124,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -133,4 +133,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -155,6 +155,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-win32-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -164,6 +164,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -173,4 +173,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -190,6 +190,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-windows-x64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -199,6 +199,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -208,4 +208,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -226,6 +226,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-win32-ia32-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -235,6 +235,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -244,4 +244,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -261,6 +261,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-windows-arm64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -270,6 +270,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -279,4 +279,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -299,6 +299,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-darwin-universal/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -308,6 +308,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -317,4 +317,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -334,6 +334,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-darwin-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -343,6 +343,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -352,4 +352,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -369,6 +369,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-darwin-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -378,6 +378,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -387,4 +387,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -408,6 +408,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-freebsd-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -417,6 +417,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -426,4 +426,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -443,6 +443,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-freebsd-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -452,6 +452,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -461,4 +461,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -483,6 +483,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-x64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -492,6 +492,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -501,4 +501,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -518,6 +518,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -527,6 +527,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -536,4 +536,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -555,6 +555,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-arm64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -564,6 +564,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -573,4 +573,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -590,6 +590,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-arm64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -599,6 +599,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -608,4 +608,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -627,6 +627,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-arm-musleabihf/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -636,6 +636,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -645,4 +645,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -662,6 +662,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-arm-gnueabihf/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -671,6 +671,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -680,4 +680,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -699,6 +699,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-loong64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -708,6 +708,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -717,4 +717,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -734,6 +734,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-loong64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -743,6 +743,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -752,4 +752,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -771,6 +771,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-riscv64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -780,6 +780,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -789,4 +789,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -806,6 +806,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-riscv64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -815,6 +815,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -824,4 +824,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -842,6 +842,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-ppc64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -851,6 +851,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -860,4 +860,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -877,6 +877,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-linux-s390x-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -886,6 +886,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -895,4 +895,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -916,6 +916,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-openharmony-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -925,6 +925,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -934,4 +934,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -951,6 +951,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-openharmony-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -960,6 +960,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -969,4 +969,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -986,6 +986,6 @@ return binding | ||
| const bindingPackageVersion = require('node-tpm2-openharmony-arm/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -995,6 +995,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9') { | ||
| if (bindingPackageVersion !== '0.1.0') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.1.0; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -1004,4 +1004,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.9 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -1008,0 +1008,0 @@ return binding |
+2
-0
@@ -108,2 +108,4 @@ /* auto-generated by NAPI-RS */ | ||
| signature: Buffer | ||
| sigScheme: string | ||
| hashAlg: string | ||
| } | ||
@@ -110,0 +112,0 @@ |
+10
-10
| { | ||
| "name": "node-tpm2", | ||
| "version": "0.0.9", | ||
| "version": "0.1.0", | ||
| "description": "TPM 2.0 attestation for Node.js — prebuilt native bindings, PCR quotes, and fleet-ready Windows PCP keys. No tpm2-tools.", | ||
@@ -97,12 +97,12 @@ "type": "module", | ||
| "optionalDependencies": { | ||
| "node-tpm2-windows-x64-msvc": "0.0.9", | ||
| "node-tpm2-windows-arm64-msvc": "0.0.9", | ||
| "node-tpm2-linux-x64-gnu": "0.0.9", | ||
| "node-tpm2-linux-arm64-gnu": "0.0.9", | ||
| "node-tpm2-linux-x64-musl": "0.0.9", | ||
| "node-tpm2-linux-arm64-musl": "0.0.9", | ||
| "node-tpm2-darwin-arm64": "0.0.9", | ||
| "node-tpm2-win32-x64-msvc": "0.0.9", | ||
| "node-tpm2-win32-arm64-msvc": "0.0.9" | ||
| "node-tpm2-windows-x64-msvc": "0.1.0", | ||
| "node-tpm2-windows-arm64-msvc": "0.1.0", | ||
| "node-tpm2-linux-x64-gnu": "0.1.0", | ||
| "node-tpm2-linux-arm64-gnu": "0.1.0", | ||
| "node-tpm2-linux-x64-musl": "0.1.0", | ||
| "node-tpm2-linux-arm64-musl": "0.1.0", | ||
| "node-tpm2-darwin-arm64": "0.1.0", | ||
| "node-tpm2-win32-x64-msvc": "0.1.0", | ||
| "node-tpm2-win32-arm64-msvc": "0.1.0" | ||
| } | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
179958
1.27%2174
1.35%64
1.59%