@tinfoilsh/verifier 2.0.0-rc.4 → 2.0.0-rc.6
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 +48 -10
- package/dist/document/collateral/collateral.d.ts +2 -0
- package/dist/document/collateral/collateral.d.ts.map +1 -1
- package/dist/document/collateral/collateral.js +8 -1
- package/dist/document/collateral/collateral.js.map +1 -1
- package/dist/document/collateral/container.js +16 -0
- package/dist/document/collateral/container.js.map +1 -0
- package/dist/document/collateral/sigstore.d.ts +2 -0
- package/dist/document/collateral/sigstore.d.ts.map +1 -1
- package/dist/document/collateral/sigstore.js +1 -1
- package/dist/document/collateral/sigstore.js.map +1 -1
- package/dist/document/document.d.ts +6 -0
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/document.js +13 -0
- package/dist/document/document.js.map +1 -1
- package/dist/errors.d.ts +16 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -9
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/endorsement/approval.js +1 -2
- package/dist/internal/endorsement/approval.js.map +1 -1
- package/dist/internal/endorsement/container.js +73 -0
- package/dist/internal/endorsement/container.js.map +1 -0
- package/dist/internal/quote/config.js +17 -4
- package/dist/internal/quote/config.js.map +1 -1
- package/dist/internal/quote/legacy.js +12 -11
- package/dist/internal/quote/legacy.js.map +1 -1
- package/dist/internal/quote/quote.js +56 -4
- package/dist/internal/quote/quote.js.map +1 -1
- package/dist/internal/runtime/config.js +11 -33
- package/dist/internal/runtime/config.js.map +1 -1
- package/dist/internal/runtime/provenance.js +52 -0
- package/dist/internal/runtime/provenance.js.map +1 -0
- package/dist/internal/sigstore/certificate.js +5 -4
- package/dist/internal/sigstore/certificate.js.map +1 -1
- package/dist/report.d.ts +203 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +244 -0
- package/dist/report.js.map +1 -0
- package/dist/verification.d.ts +100 -36
- package/dist/verification.d.ts.map +1 -1
- package/dist/verification.js +91 -37
- package/dist/verification.js.map +1 -1
- package/dist/verifier.d.ts +130 -67
- package/dist/verifier.d.ts.map +1 -1
- package/dist/verifier.js +300 -140
- package/dist/verifier.js.map +1 -1
- package/dist/version.js +2 -2
- package/dist/version.js.map +1 -1
- package/package.json +2 -3
package/dist/verification.d.ts
CHANGED
|
@@ -34,14 +34,36 @@ export interface ArtifactVerification {
|
|
|
34
34
|
/** Undefined when no freshness approval was consulted. */
|
|
35
35
|
readonly approvalTime?: Date;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* How a verification was performed. The verifier and the client that called
|
|
39
|
+
* it fill it in from their own state; none of it is attested by or checked
|
|
40
|
+
* against the document.
|
|
41
|
+
*/
|
|
37
42
|
export interface VerificationMetadata {
|
|
43
|
+
/** The name and version of the SDK that verified the document. */
|
|
38
44
|
readonly verifier: {
|
|
39
45
|
readonly name: string;
|
|
40
46
|
readonly version: string;
|
|
41
47
|
};
|
|
48
|
+
/** The instant that the document was appraised at. It is not a freshness guarantee. */
|
|
42
49
|
readonly verifiedAt: Date;
|
|
50
|
+
/**
|
|
51
|
+
* The host, with an optional port, that the client contacted for the
|
|
52
|
+
* document: for an enclave client its enclave, even through an EHBP proxy,
|
|
53
|
+
* for a router client the router that it chose, and for a gateway client
|
|
54
|
+
* the replica. It is what the client connected to, not an attested fact,
|
|
55
|
+
* so it proves nothing about the enclave. The verifier doesn't know the
|
|
56
|
+
* host and leaves it undefined; a client sets it on every report that it
|
|
57
|
+
* hands out, and a caller that runs the verifier itself can set it with
|
|
58
|
+
* {@link VerificationReport.withHost}.
|
|
59
|
+
*/
|
|
60
|
+
readonly host?: string;
|
|
43
61
|
}
|
|
44
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* A measurement in the report's JSON form: the platform, and each register
|
|
64
|
+
* that it holds as lowercase hex. A code measurement leaves out the
|
|
65
|
+
* registers that the release leaves to the platform.
|
|
66
|
+
*/
|
|
45
67
|
export type MeasurementJSON = {
|
|
46
68
|
readonly platform: "sev-snp";
|
|
47
69
|
readonly launch?: string;
|
|
@@ -53,50 +75,82 @@ export type MeasurementJSON = {
|
|
|
53
75
|
readonly rtmr2?: string;
|
|
54
76
|
readonly rtmr3?: string;
|
|
55
77
|
};
|
|
56
|
-
/** A `ConfigVerification` with its times as ISO 8601 strings. */
|
|
57
|
-
export type ConfigVerificationJSON = Omit<ConfigVerification, "approvalTime" | "signatureTime"> & {
|
|
58
|
-
readonly approvalTime?: string;
|
|
59
|
-
readonly signatureTime?: string;
|
|
60
|
-
};
|
|
61
|
-
/** An `ArtifactVerification` with its time as an ISO 8601 string. */
|
|
62
|
-
export type ArtifactVerificationJSON = Omit<ArtifactVerification, "approvalTime"> & {
|
|
63
|
-
readonly approvalTime?: string;
|
|
64
|
-
};
|
|
65
78
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* not established are left out.
|
|
79
|
+
* A {@link ConfigVerification} in the report's JSON form, with times as RFC
|
|
80
|
+
* 3339 strings in UTC. A member that the config doesn't have, such as the
|
|
81
|
+
* reference of a config that no endorsement supplied, is left out.
|
|
70
82
|
*/
|
|
71
|
-
export interface
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
readonly
|
|
75
|
-
readonly
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
83
|
+
export interface ConfigVerificationJSON {
|
|
84
|
+
readonly source: ReferenceSource;
|
|
85
|
+
readonly name?: string;
|
|
86
|
+
readonly digest: string;
|
|
87
|
+
readonly reference?: string;
|
|
88
|
+
readonly signing_key_hint?: string;
|
|
89
|
+
readonly approval_time?: string;
|
|
90
|
+
readonly registry_id?: string;
|
|
91
|
+
readonly signature_time?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* An {@link ArtifactVerification} in the report's JSON form, with its time
|
|
95
|
+
* as an RFC 3339 string in UTC. A member that the artifact doesn't have,
|
|
96
|
+
* such as the name of an embedded artifact, is left out.
|
|
97
|
+
*/
|
|
98
|
+
export interface ArtifactVerificationJSON {
|
|
99
|
+
readonly source: ReferenceSource;
|
|
100
|
+
readonly repo?: string;
|
|
101
|
+
readonly tag?: string;
|
|
102
|
+
readonly digest: string;
|
|
103
|
+
readonly name?: string;
|
|
104
|
+
readonly commit?: string;
|
|
105
|
+
readonly approval_time?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The `verified_facts` object of the report's JSON form, as
|
|
109
|
+
* {@link VerifiedFacts.toJSON} returns it. The channel keys appear only in
|
|
110
|
+
* `crypto_material`.
|
|
111
|
+
*/
|
|
112
|
+
export interface VerifiedFactsJSON {
|
|
113
|
+
readonly config_repo: string;
|
|
114
|
+
readonly code_digest: string;
|
|
115
|
+
readonly code_tag?: string;
|
|
116
|
+
/** Left out when the release fixes no register on the enclave's platform. */
|
|
117
|
+
readonly code_measurement?: MeasurementJSON;
|
|
118
|
+
readonly enclave_measurement: MeasurementJSON;
|
|
78
119
|
readonly config?: ConfigVerificationJSON;
|
|
79
120
|
readonly runtime?: ArtifactVerificationJSON;
|
|
80
121
|
readonly platform?: ArtifactVerificationJSON;
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
|
|
84
|
-
|
|
122
|
+
readonly crypto_material: readonly CryptoMaterialItem[];
|
|
123
|
+
readonly freshness_expires_at?: string;
|
|
124
|
+
}
|
|
125
|
+
/** The `metadata` object of the report's JSON form. */
|
|
126
|
+
export interface VerificationMetadataJSON {
|
|
127
|
+
/** The appraisal instant, as an RFC 3339 string in UTC. */
|
|
128
|
+
readonly verified_at: string;
|
|
129
|
+
/** The name and version of the SDK that verified the document. */
|
|
130
|
+
readonly verifier?: {
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly version: string;
|
|
85
133
|
};
|
|
134
|
+
/** The host that the client contacted for the document, present only in a report that a client produced. Not attested. */
|
|
135
|
+
readonly host?: string;
|
|
86
136
|
}
|
|
87
137
|
/**
|
|
88
|
-
* The facts proven by verifying an attestation document
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
138
|
+
* The facts proven by verifying an attestation document, including the
|
|
139
|
+
* channel keys that a caller binds its traffic to: the `verifiedFacts` of
|
|
140
|
+
* the {@link VerificationReport} of a document that the verifier accepted.
|
|
141
|
+
* They are the only source of channel keys. Only the verifier creates them:
|
|
142
|
+
* the constructor is private, so type-checked code cannot construct them,
|
|
143
|
+
* and a call from untyped code is refused at runtime by a token that only
|
|
144
|
+
* this module holds. Every fact is a `readonly` property
|
|
92
145
|
* whose value is fixed at construction: the instance and every nested
|
|
93
146
|
* object and array are frozen, so a property always yields the same
|
|
94
147
|
* reference and nothing on it can be reassigned. Register bytes
|
|
95
148
|
* (`Uint8Array`) and `Date` values have no frozen form in the language; they
|
|
96
|
-
* are shared as stored and must not be mutated. `toJSON()` gives
|
|
97
|
-
*
|
|
149
|
+
* are shared as stored and must not be mutated. `toJSON()` gives the facts
|
|
150
|
+
* in the JSON form that every Tinfoil SDK exports, for display and
|
|
151
|
+
* transport; that JSON authorizes nothing.
|
|
98
152
|
*/
|
|
99
|
-
export declare class
|
|
153
|
+
export declare class VerifiedFacts {
|
|
100
154
|
/** Digest of the verified code or runtime artifact. */
|
|
101
155
|
readonly codeDigest: string;
|
|
102
156
|
/** Release tag of the verified code or runtime artifact. */
|
|
@@ -117,8 +171,6 @@ export declare class Verification {
|
|
|
117
171
|
readonly platform?: ArtifactVerification;
|
|
118
172
|
/** Earliest approval/freshness timestamp plus the maximum age, capped by CPU collateral validity. */
|
|
119
173
|
readonly freshnessExpiresAt?: Date;
|
|
120
|
-
/** The verifier's name and version, and when it ran. */
|
|
121
|
-
readonly metadata: VerificationMetadata;
|
|
122
174
|
private constructor();
|
|
123
175
|
/** The data of the endorsed item with the given id and format, or undefined. */
|
|
124
176
|
cryptoMaterialData(id: string, format: string): string | undefined;
|
|
@@ -126,8 +178,20 @@ export declare class Verification {
|
|
|
126
178
|
get tlsPublicKeyFP(): string | undefined;
|
|
127
179
|
/** The endorsed HPKE (x25519) public key, or undefined if the document endorses none in that format. */
|
|
128
180
|
get hpkePublicKey(): string | undefined;
|
|
129
|
-
/**
|
|
130
|
-
|
|
181
|
+
/**
|
|
182
|
+
* The facts as the `verified_facts` object of the report's JSON form, the
|
|
183
|
+
* form that every Tinfoil SDK exports, so that `JSON.stringify(facts)`
|
|
184
|
+
* writes it: snake_case members, registers and digests as lowercase hex,
|
|
185
|
+
* times as RFC 3339 strings in UTC, and facts that were not established
|
|
186
|
+
* left out. A code measurement holds only the registers that the release
|
|
187
|
+
* fixes, and is left out when it fixes none.
|
|
188
|
+
*
|
|
189
|
+
* The JSON is for display and transport, and it authorizes nothing: this
|
|
190
|
+
* package reads nothing back from it, and a holder of the JSON can't tell
|
|
191
|
+
* whether a verifier wrote it. Bind a channel only to the keys of facts
|
|
192
|
+
* that a verification returned.
|
|
193
|
+
*/
|
|
194
|
+
toJSON(): VerifiedFactsJSON;
|
|
131
195
|
}
|
|
132
196
|
/** The data of the first item with the given id and format, or undefined. */
|
|
133
197
|
export declare function cryptoMaterialData(items: readonly CryptoMaterialItem[], id: string, format: string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../src/verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4G,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3K,OAAO,EAAgD,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAEhI,+GAA+G;AAC/G,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEpE,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,gDAAgD;IAChD,QAAQ,CAAC,IA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B,EAAE,WAAW,CAAC;IACzC,8DAA8D;IAC9D,QAAQ,CAAC,cAAc,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvD,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrC,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IACzC,qGAAqG;IACrG,QAAQ,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAEnC,OAAO;IAmBP,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIlE,oGAAoG;IACpG,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,wGAAwG;IACxG,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,IAAI,iBAAiB;CAe5B;AAaD,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvH"}
|
package/dist/verification.js
CHANGED
|
@@ -2,25 +2,29 @@ import { CRYPTO_MATERIAL_ID_HPKE, CRYPTO_MATERIAL_ID_TLS, KEY_SPKI_FP_SHA256_V1_
|
|
|
2
2
|
import { UsageError } from "./errors.js";
|
|
3
3
|
import { cloneExpected, cloneMeasurement, registerHex } from "./measurement.js";
|
|
4
4
|
/** Only this module holds the token the constructor requires, so untyped code that calls it is refused. */
|
|
5
|
-
const BUILT_HERE = Symbol("
|
|
5
|
+
const BUILT_HERE = Symbol("VerifiedFacts");
|
|
6
6
|
/** Calls the private constructor; the class assigns it, as the only place the constructor can be called. */
|
|
7
7
|
let construct;
|
|
8
8
|
/**
|
|
9
|
-
* The facts proven by verifying an attestation document
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* The facts proven by verifying an attestation document, including the
|
|
10
|
+
* channel keys that a caller binds its traffic to: the `verifiedFacts` of
|
|
11
|
+
* the {@link VerificationReport} of a document that the verifier accepted.
|
|
12
|
+
* They are the only source of channel keys. Only the verifier creates them:
|
|
13
|
+
* the constructor is private, so type-checked code cannot construct them,
|
|
14
|
+
* and a call from untyped code is refused at runtime by a token that only
|
|
15
|
+
* this module holds. Every fact is a `readonly` property
|
|
13
16
|
* whose value is fixed at construction: the instance and every nested
|
|
14
17
|
* object and array are frozen, so a property always yields the same
|
|
15
18
|
* reference and nothing on it can be reassigned. Register bytes
|
|
16
19
|
* (`Uint8Array`) and `Date` values have no frozen form in the language; they
|
|
17
|
-
* are shared as stored and must not be mutated. `toJSON()` gives
|
|
18
|
-
*
|
|
20
|
+
* are shared as stored and must not be mutated. `toJSON()` gives the facts
|
|
21
|
+
* in the JSON form that every Tinfoil SDK exports, for display and
|
|
22
|
+
* transport; that JSON authorizes nothing.
|
|
19
23
|
*/
|
|
20
|
-
export class
|
|
24
|
+
export class VerifiedFacts {
|
|
21
25
|
constructor(token, fields) {
|
|
22
26
|
if (token !== BUILT_HERE)
|
|
23
|
-
throw new UsageError("
|
|
27
|
+
throw new UsageError("verified facts come from a verifier: verify a document to get them");
|
|
24
28
|
this.codeDigest = fields.codeDigest;
|
|
25
29
|
this.codeTag = fields.codeTag;
|
|
26
30
|
this.configRepo = fields.configRepo;
|
|
@@ -31,7 +35,6 @@ export class Verification {
|
|
|
31
35
|
this.runtime = fields.runtime && freezeDeep(copyArtifact(fields.runtime));
|
|
32
36
|
this.platform = fields.platform && freezeDeep(copyArtifact(fields.platform));
|
|
33
37
|
this.freshnessExpiresAt = copyDate(fields.freshnessExpiresAt);
|
|
34
|
-
this.metadata = freezeDeep({ verifier: { ...fields.metadata.verifier }, verifiedAt: new Date(fields.metadata.verifiedAt.getTime()) });
|
|
35
38
|
Object.freeze(this);
|
|
36
39
|
}
|
|
37
40
|
/** The data of the endorsed item with the given id and format, or undefined. */
|
|
@@ -46,56 +49,77 @@ export class Verification {
|
|
|
46
49
|
get hpkePublicKey() {
|
|
47
50
|
return this.cryptoMaterialData(CRYPTO_MATERIAL_ID_HPKE, KEY_X25519_HPKE_V1_FORMAT);
|
|
48
51
|
}
|
|
49
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The facts as the `verified_facts` object of the report's JSON form, the
|
|
54
|
+
* form that every Tinfoil SDK exports, so that `JSON.stringify(facts)`
|
|
55
|
+
* writes it: snake_case members, registers and digests as lowercase hex,
|
|
56
|
+
* times as RFC 3339 strings in UTC, and facts that were not established
|
|
57
|
+
* left out. A code measurement holds only the registers that the release
|
|
58
|
+
* fixes, and is left out when it fixes none.
|
|
59
|
+
*
|
|
60
|
+
* The JSON is for display and transport, and it authorizes nothing: this
|
|
61
|
+
* package reads nothing back from it, and a holder of the JSON can't tell
|
|
62
|
+
* whether a verifier wrote it. Bind a channel only to the keys of facts
|
|
63
|
+
* that a verification returned.
|
|
64
|
+
*/
|
|
50
65
|
toJSON() {
|
|
66
|
+
const code = codeMeasurementJSON(this.codeMeasurement);
|
|
51
67
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
cryptoMaterial: this.cryptoMaterial.map((i) => ({ ...i })),
|
|
68
|
+
config_repo: this.configRepo,
|
|
69
|
+
code_digest: this.codeDigest,
|
|
70
|
+
...stringJSON("code_tag", this.codeTag),
|
|
71
|
+
...(code === undefined ? {} : { code_measurement: code }),
|
|
72
|
+
enclave_measurement: measurementJSON(this.enclaveMeasurement),
|
|
58
73
|
...(this.config === undefined ? {} : { config: configJSON(this.config) }),
|
|
59
74
|
...(this.runtime === undefined ? {} : { runtime: artifactJSON(this.runtime) }),
|
|
60
75
|
...(this.platform === undefined ? {} : { platform: artifactJSON(this.platform) }),
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
crypto_material: this.cryptoMaterial.map((i) => ({ id: i.id, format: i.format, data: i.data })),
|
|
77
|
+
...timeJSON("freshness_expires_at", this.freshnessExpiresAt),
|
|
63
78
|
};
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
(() => {
|
|
67
|
-
construct = (fields) => new
|
|
82
|
+
construct = (fields) => new VerifiedFacts(BUILT_HERE, fields);
|
|
68
83
|
})();
|
|
69
|
-
/** @internal The
|
|
70
|
-
export function
|
|
84
|
+
/** @internal The facts that the verifier proved, as a {@link VerifiedFacts}; the verifier is its only caller. */
|
|
85
|
+
export function verifiedFactsOf(fields) {
|
|
71
86
|
return construct(fields);
|
|
72
87
|
}
|
|
88
|
+
/** @internal A copy of `v` that shares no register bytes or dates with it. */
|
|
89
|
+
export function copyVerifiedFacts(v) {
|
|
90
|
+
// The constructor copies every field that it is given.
|
|
91
|
+
return construct(v);
|
|
92
|
+
}
|
|
73
93
|
/** The data of the first item with the given id and format, or undefined. */
|
|
74
94
|
export function cryptoMaterialData(items, id, format) {
|
|
75
95
|
return items.find((i) => i.id === id && i.format === format)?.data;
|
|
76
96
|
}
|
|
77
|
-
/** Freezes a plain object or array and everything reachable through it; byte views and dates are left as they are. */
|
|
78
|
-
function freezeDeep(value) {
|
|
97
|
+
/** @internal Freezes a plain object or array and everything reachable through it; byte views and dates are left as they are. */
|
|
98
|
+
export function freezeDeep(value) {
|
|
79
99
|
if (value === null || typeof value !== "object" || ArrayBuffer.isView(value) || value instanceof Date)
|
|
80
100
|
return value;
|
|
81
101
|
for (const nested of Object.values(value))
|
|
82
102
|
freezeDeep(nested);
|
|
83
103
|
return Object.freeze(value);
|
|
84
104
|
}
|
|
85
|
-
|
|
105
|
+
/** @internal */
|
|
106
|
+
export function copyConfig(c) {
|
|
86
107
|
return {
|
|
87
108
|
...c,
|
|
88
109
|
...(c.approvalTime === undefined ? {} : { approvalTime: copyDate(c.approvalTime) }),
|
|
89
110
|
...(c.signatureTime === undefined ? {} : { signatureTime: copyDate(c.signatureTime) }),
|
|
90
111
|
};
|
|
91
112
|
}
|
|
92
|
-
|
|
113
|
+
/** @internal */
|
|
114
|
+
export function copyArtifact(a) {
|
|
93
115
|
return { ...a, ...(a.approvalTime === undefined ? {} : { approvalTime: copyDate(a.approvalTime) }) };
|
|
94
116
|
}
|
|
95
|
-
|
|
117
|
+
/** @internal */
|
|
118
|
+
export function copyDate(d) {
|
|
96
119
|
return d === undefined ? undefined : new Date(d.getTime());
|
|
97
120
|
}
|
|
98
|
-
|
|
121
|
+
/** @internal A measurement or expectation in the report's JSON form; an unset register is left out. */
|
|
122
|
+
export function measurementJSON(m) {
|
|
99
123
|
switch (m.platform) {
|
|
100
124
|
case "sev-snp":
|
|
101
125
|
return { platform: "sev-snp", ...hexJSON("launch", m.launch) };
|
|
@@ -110,20 +134,50 @@ function measurementJSON(m) {
|
|
|
110
134
|
};
|
|
111
135
|
}
|
|
112
136
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
137
|
+
/** @internal A code measurement in the report's JSON form, or undefined when it holds no register, so that it is left out. */
|
|
138
|
+
export function codeMeasurementJSON(e) {
|
|
139
|
+
const out = measurementJSON(e);
|
|
140
|
+
return Object.keys(out).length > 1 ? out : undefined;
|
|
141
|
+
}
|
|
142
|
+
/** @internal */
|
|
143
|
+
export function configJSON(c) {
|
|
144
|
+
return {
|
|
145
|
+
source: c.source,
|
|
146
|
+
...stringJSON("name", c.name),
|
|
147
|
+
digest: c.digest,
|
|
148
|
+
...stringJSON("reference", c.reference),
|
|
149
|
+
...stringJSON("signing_key_hint", c.signingKeyHint),
|
|
150
|
+
...timeJSON("approval_time", c.approvalTime),
|
|
151
|
+
...stringJSON("registry_id", c.registryID),
|
|
152
|
+
...timeJSON("signature_time", c.signatureTime),
|
|
153
|
+
};
|
|
116
154
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return {
|
|
155
|
+
/** @internal */
|
|
156
|
+
export function artifactJSON(a) {
|
|
157
|
+
return {
|
|
158
|
+
source: a.source,
|
|
159
|
+
...stringJSON("repo", a.repo),
|
|
160
|
+
...stringJSON("tag", a.tag),
|
|
161
|
+
digest: a.digest,
|
|
162
|
+
...stringJSON("name", a.name),
|
|
163
|
+
...stringJSON("commit", a.commit),
|
|
164
|
+
...timeJSON("approval_time", a.approvalTime),
|
|
165
|
+
};
|
|
120
166
|
}
|
|
121
167
|
/** `{ [key]: hex }` for a set register, `{}` for an unset one. */
|
|
122
168
|
function hexJSON(key, r) {
|
|
123
169
|
return r === undefined ? {} : { [key]: registerHex(r) };
|
|
124
170
|
}
|
|
125
|
-
/** `{ [key]:
|
|
126
|
-
function
|
|
127
|
-
return
|
|
171
|
+
/** @internal `{ [key]: s }` for a non-empty string, `{}` for an empty or absent one, since the JSON form never holds "". */
|
|
172
|
+
export function stringJSON(key, s) {
|
|
173
|
+
return s === undefined || s === "" ? {} : { [key]: s };
|
|
174
|
+
}
|
|
175
|
+
/** @internal An instant as an RFC 3339 string in UTC, without a fraction when it falls on a whole second. */
|
|
176
|
+
export function rfc3339(d) {
|
|
177
|
+
return d.toISOString().replace(/\.000Z$/, "Z");
|
|
178
|
+
}
|
|
179
|
+
/** @internal `{ [key]: time }` for a set time, `{}` for an unset one. */
|
|
180
|
+
export function timeJSON(key, d) {
|
|
181
|
+
return d === undefined ? {} : { [key]: rfc3339(d) };
|
|
128
182
|
}
|
|
129
183
|
//# sourceMappingURL=verification.js.map
|
package/dist/verification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../src/verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,yBAAyB,EAA2B,MAAM,wBAAwB,CAAC;AAC3K,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,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