node-tpm2 0.0.4-beta.3 → 0.0.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +361 -88
- package/api.js +107 -0
- package/docs/api-reference.md +915 -0
- package/docs/roadmap.md +220 -0
- package/docs/windows-pcp.md +18 -0
- package/index.d.ts +47 -23
- package/native.cjs +57 -52
- package/native.d.ts +26 -0
- package/package.json +12 -10
package/native.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface AkBlobJs {
|
|
|
13
13
|
private: Buffer
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export declare function createKey(opts?: KeyCreateOptionsJs | undefined | null): Promise<KeyCreateResultJs>
|
|
17
|
+
|
|
16
18
|
export interface FixedPropertiesJs {
|
|
17
19
|
manufacturer: string
|
|
18
20
|
firmwareVersion: string
|
|
@@ -24,6 +26,21 @@ export declare function getFixedProperties(): Promise<FixedPropertiesJs>
|
|
|
24
26
|
|
|
25
27
|
export declare function isAvailable(): Promise<boolean>
|
|
26
28
|
|
|
29
|
+
export declare function keyBlobPublicDer(keyBlob: AkBlobJs): Promise<Buffer>
|
|
30
|
+
|
|
31
|
+
export interface KeyCreateOptionsJs {
|
|
32
|
+
keyType?: string
|
|
33
|
+
sign?: boolean
|
|
34
|
+
decrypt?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface KeyCreateResultJs {
|
|
38
|
+
publicKeyDer: Buffer
|
|
39
|
+
keyBlob: AkBlobJs
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare function pcrExtend(index: number, digest: Buffer): Promise<void>
|
|
43
|
+
|
|
27
44
|
export declare function pcrRead(selection: Array<number>, bank?: string | undefined | null): Promise<Record<string, string>>
|
|
28
45
|
|
|
29
46
|
export declare function provisionAk(opts?: ProvisionAkOptionsJs | undefined | null): Promise<ProvisionAkJs>
|
|
@@ -55,6 +72,8 @@ export interface QuoteOptionsJs {
|
|
|
55
72
|
bank?: string
|
|
56
73
|
}
|
|
57
74
|
|
|
75
|
+
export declare function randomBytes(count: number): Promise<Buffer>
|
|
76
|
+
|
|
58
77
|
export declare function readEkCertificate(): Promise<Buffer | null>
|
|
59
78
|
|
|
60
79
|
export declare function readPublic(handle: string): Promise<ReadPublicJs>
|
|
@@ -63,3 +82,10 @@ export interface ReadPublicJs {
|
|
|
63
82
|
publicKeyDer: Buffer
|
|
64
83
|
name: Buffer
|
|
65
84
|
}
|
|
85
|
+
|
|
86
|
+
export declare function signKeyBlob(opts: SignKeyBlobOptionsJs): Promise<Buffer>
|
|
87
|
+
|
|
88
|
+
export interface SignKeyBlobOptionsJs {
|
|
89
|
+
keyBlob: AkBlobJs
|
|
90
|
+
digest: Buffer
|
|
91
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-tpm2",
|
|
3
|
-
"version": "0.0.4-beta.
|
|
3
|
+
"version": "0.0.4-beta.4",
|
|
4
4
|
"description": "TPM 2.0 attestation for Node.js — prebuilt native bindings, PCR quotes, and fleet-ready Windows PCP keys. No tpm2-tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
"native.cjs",
|
|
42
42
|
"native.d.ts",
|
|
43
43
|
"docs/getting-started.md",
|
|
44
|
+
"docs/api-reference.md",
|
|
44
45
|
"docs/windows-pcp.md",
|
|
46
|
+
"docs/roadmap.md",
|
|
45
47
|
"examples"
|
|
46
48
|
],
|
|
47
49
|
"engines": {
|
|
@@ -79,14 +81,14 @@
|
|
|
79
81
|
"@napi-rs/cli": "^3.7.2"
|
|
80
82
|
},
|
|
81
83
|
"optionalDependencies": {
|
|
82
|
-
"node-tpm2-windows-x64-msvc": "0.0.4-beta.
|
|
83
|
-
"node-tpm2-windows-arm64-msvc": "0.0.4-beta.
|
|
84
|
-
"node-tpm2-linux-x64-gnu": "0.0.4-beta.
|
|
85
|
-
"node-tpm2-linux-arm64-gnu": "0.0.4-beta.
|
|
86
|
-
"node-tpm2-linux-x64-musl": "0.0.4-beta.
|
|
87
|
-
"node-tpm2-linux-arm64-musl": "0.0.4-beta.
|
|
88
|
-
"node-tpm2-darwin-arm64": "0.0.4-beta.
|
|
89
|
-
"node-tpm2-win32-x64-msvc": "0.0.4-beta.
|
|
90
|
-
"node-tpm2-win32-arm64-msvc": "0.0.4-beta.
|
|
84
|
+
"node-tpm2-windows-x64-msvc": "0.0.4-beta.4",
|
|
85
|
+
"node-tpm2-windows-arm64-msvc": "0.0.4-beta.4",
|
|
86
|
+
"node-tpm2-linux-x64-gnu": "0.0.4-beta.4",
|
|
87
|
+
"node-tpm2-linux-arm64-gnu": "0.0.4-beta.4",
|
|
88
|
+
"node-tpm2-linux-x64-musl": "0.0.4-beta.4",
|
|
89
|
+
"node-tpm2-linux-arm64-musl": "0.0.4-beta.4",
|
|
90
|
+
"node-tpm2-darwin-arm64": "0.0.4-beta.4",
|
|
91
|
+
"node-tpm2-win32-x64-msvc": "0.0.4-beta.4",
|
|
92
|
+
"node-tpm2-win32-arm64-msvc": "0.0.4-beta.4"
|
|
91
93
|
}
|
|
92
94
|
}
|