| /** | ||
| * Verify TPM signatures with Node crypto (algorithm matches TPM wire export). | ||
| */ | ||
| import { createPublicKey, createVerify, verify, constants } from 'node:crypto'; | ||
| export function tpmPublicKeyFromDer(publicKeyDer) { | ||
| return createPublicKey({ key: publicKeyDer, format: 'der', type: 'spki' }); | ||
| } | ||
| function verifyRsaPkcs1Sha256(key, data, signature) { | ||
| const verifier = createVerify('RSA-SHA256'); | ||
| verifier.update(data); | ||
| return verifier.verify({ key, padding: constants.RSA_PKCS1_PADDING }, signature); | ||
| } | ||
| function tpm2bEncode(payload) { | ||
| const out = Buffer.alloc(2 + payload.length); | ||
| out.writeUInt16BE(payload.length, 0); | ||
| payload.copy(out, 2); | ||
| return out; | ||
| } | ||
| /** Quote / attest: TPM signs hash(attestation blob) — pass full TPMS_ATTEST message. */ | ||
| export function verifyAttestationSignature(publicKeyDer, message, signature) { | ||
| const key = tpmPublicKeyFromDer(publicKeyDer); | ||
| if (key.asymmetricKeyType === 'rsa') { | ||
| if (verifyRsaPkcs1Sha256(key, message, signature)) return true; | ||
| // Some stacks hash the TPM2B-wrapped quoted blob. | ||
| return verifyRsaPkcs1Sha256(key, tpm2bEncode(message), signature); | ||
| } | ||
| return verify('sha256', message, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| } | ||
| /** | ||
| * Sign with external digest (TPM_ST_HASHCHECK): TPM signs the 32-byte digest directly. | ||
| * Do not pass 'sha256' — that would hash the digest again. | ||
| */ | ||
| export function verifyDigestSignature(publicKeyDer, digest, signature) { | ||
| const key = tpmPublicKeyFromDer(publicKeyDer); | ||
| if (key.asymmetricKeyType === 'rsa') { | ||
| return verify(null, digest, { key, padding: constants.RSA_PKCS1_PADDING }, signature); | ||
| } | ||
| return verify(null, digest, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| } |
@@ -11,4 +11,5 @@ #!/usr/bin/env node | ||
| import { createHash, createPublicKey, verify } from 'node:crypto'; | ||
| import { createHash } from 'node:crypto'; | ||
| import { Tpm } from '../index.js'; | ||
| import { verifyDigestSignature } from './tpm-crypto-verify.mjs'; | ||
@@ -31,4 +32,3 @@ const SECRET = Buffer.from('node-tpm2-seal-test-secret'); | ||
| } | ||
| const key = createPublicKey({ key: publicKeyDer, format: 'der', type: 'spki' }); | ||
| const verified = verify('sha256', digest, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| const verified = verifyDigestSignature(publicKeyDer, digest, signature); | ||
| if (!verified) { | ||
@@ -35,0 +35,0 @@ console.error('FAIL: signature did not verify'); |
| #!/usr/bin/env node | ||
| /** | ||
| * Verify Linux ECDSA quote signature against akPublicDer. | ||
| * Verify quote signature against akPublicDer (ECDSA on Linux TBS; RSA on Windows PCP). | ||
| * | ||
| * From repo (tests local build with fix): | ||
| * npm run build | ||
| * Usage: | ||
| * node examples/quote-verify.mjs | ||
| * | ||
| * From npm install (after 0.0.7+ published): | ||
| * node node_modules/node-tpm2/examples/quote-verify.mjs | ||
@@ -15,9 +12,6 @@ * | ||
| import { createHash, createPublicKey, verify } from 'node:crypto'; | ||
| import { dirname } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { createHash } from 'node:crypto'; | ||
| import { Tpm } from '../index.js'; | ||
| import { tpmPublicKeyFromDer, verifyAttestationSignature } from './tpm-crypto-verify.mjs'; | ||
| const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
| const qualifyingData = createHash('sha256').update('node-tpm2-repro').digest(); | ||
@@ -33,6 +27,7 @@ | ||
| const key = createPublicKey({ key: akPublicDer, format: 'der', type: 'spki' }); | ||
| const ok = verify('sha256', message, { key, dsaEncoding: 'ieee-p1363' }, signature); | ||
| const key = tpmPublicKeyFromDer(akPublicDer); | ||
| const ok = verifyAttestationSignature(akPublicDer, message, signature); | ||
| console.log({ | ||
| keyType: key.asymmetricKeyType, | ||
| akPublicDerLen: akPublicDer.length, | ||
@@ -47,3 +42,2 @@ messageLen: message.length, | ||
| console.error('FAIL: signature did not verify'); | ||
| console.error(' sigLen 64 expected after quote fix; 24 means old 0.0.6 npm build'); | ||
| process.exit(1); | ||
@@ -50,0 +44,0 @@ } |
+156
-156
@@ -80,6 +80,6 @@ // prettier-ignore | ||
| const bindingPackageVersion = require('node-tpm2-android-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -89,6 +89,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -98,4 +98,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -124,6 +124,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -133,4 +133,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -164,6 +164,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -173,4 +173,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -199,6 +199,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -208,4 +208,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -235,6 +235,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -244,4 +244,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -270,6 +270,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -279,4 +279,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -308,6 +308,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -317,4 +317,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -343,6 +343,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -352,4 +352,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -378,6 +378,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -387,4 +387,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -417,6 +417,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -426,4 +426,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -452,6 +452,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -461,4 +461,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -492,6 +492,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -501,4 +501,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -527,6 +527,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -536,4 +536,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -564,6 +564,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -573,4 +573,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -599,6 +599,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -608,4 +608,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -636,6 +636,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -645,4 +645,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -671,6 +671,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -680,4 +680,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -708,6 +708,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -717,4 +717,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -743,6 +743,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -752,4 +752,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -780,6 +780,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -789,4 +789,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -815,6 +815,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -824,4 +824,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -851,6 +851,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -860,4 +860,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -886,6 +886,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -895,4 +895,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -925,6 +925,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -934,4 +934,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -960,6 +960,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -969,4 +969,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 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-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -995,6 +995,6 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1') { | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1') { | ||
| if (typeof process !== 'undefined' && process.emitWarning) { | ||
| process.emitWarning( | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.1; run npm install or npm run build`, | ||
| `[node-tpm2] optional binding version ${bindingPackageVersion} !== 0.0.9-beta.2.1; run npm install or npm run build`, | ||
| { type: 'node-tpm2', code: 'NATIVE_BINDING_VERSION' }, | ||
@@ -1004,4 +1004,4 @@ ) | ||
| } | ||
| if (bindingPackageVersion !== '0.0.9-beta.1' && 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-beta.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.9-beta.2.1' && 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-beta.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -1008,0 +1008,0 @@ return binding |
+10
-10
| { | ||
| "name": "node-tpm2", | ||
| "version": "0.0.9-beta.1", | ||
| "version": "0.0.9-beta.2.1", | ||
| "description": "TPM 2.0 attestation for Node.js — prebuilt native bindings, PCR quotes, and fleet-ready Windows PCP keys. No tpm2-tools.", | ||
@@ -93,12 +93,12 @@ "type": "module", | ||
| "optionalDependencies": { | ||
| "node-tpm2-windows-x64-msvc": "0.0.9-beta.1", | ||
| "node-tpm2-windows-arm64-msvc": "0.0.9-beta.1", | ||
| "node-tpm2-linux-x64-gnu": "0.0.9-beta.1", | ||
| "node-tpm2-linux-arm64-gnu": "0.0.9-beta.1", | ||
| "node-tpm2-linux-x64-musl": "0.0.9-beta.1", | ||
| "node-tpm2-linux-arm64-musl": "0.0.9-beta.1", | ||
| "node-tpm2-darwin-arm64": "0.0.9-beta.1", | ||
| "node-tpm2-win32-x64-msvc": "0.0.9-beta.1", | ||
| "node-tpm2-win32-arm64-msvc": "0.0.9-beta.1" | ||
| "node-tpm2-windows-x64-msvc": "0.0.9-beta.2.1", | ||
| "node-tpm2-windows-arm64-msvc": "0.0.9-beta.2.1", | ||
| "node-tpm2-linux-x64-gnu": "0.0.9-beta.2.1", | ||
| "node-tpm2-linux-arm64-gnu": "0.0.9-beta.2.1", | ||
| "node-tpm2-linux-x64-musl": "0.0.9-beta.2.1", | ||
| "node-tpm2-linux-arm64-musl": "0.0.9-beta.2.1", | ||
| "node-tpm2-darwin-arm64": "0.0.9-beta.2.1", | ||
| "node-tpm2-win32-x64-msvc": "0.0.9-beta.2.1", | ||
| "node-tpm2-win32-arm64-msvc": "0.0.9-beta.2.1" | ||
| } | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
177334
0.99%18
5.88%2105
1.64%63
1.61%