electron-cast 0.3.1 → 0.4.0
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/CHANGELOG.md +60 -0
- package/README.md +123 -14
- package/dist/cjs/client/auth/build-time.d.ts +7 -0
- package/dist/cjs/client/auth/build-time.js +11 -0
- package/dist/cjs/client/auth/build-time.js.map +1 -0
- package/dist/cjs/client/auth/cast-auth.d.ts +44 -0
- package/dist/cjs/client/auth/cast-auth.js +145 -0
- package/dist/cjs/client/auth/cast-auth.js.map +1 -0
- package/dist/cjs/client/auth/cast-cert-validator.d.ts +34 -0
- package/dist/cjs/client/auth/cast-cert-validator.js +89 -0
- package/dist/cjs/client/auth/cast-cert-validator.js.map +1 -0
- package/dist/cjs/client/auth/crl.d.ts +45 -0
- package/dist/cjs/client/auth/crl.js +227 -0
- package/dist/cjs/client/auth/crl.js.map +1 -0
- package/dist/cjs/client/auth/der.d.ts +62 -0
- package/dist/cjs/client/auth/der.js +208 -0
- package/dist/cjs/client/auth/der.js.map +1 -0
- package/dist/cjs/client/auth/names.d.ts +52 -0
- package/dist/cjs/client/auth/names.js +447 -0
- package/dist/cjs/client/auth/names.js.map +1 -0
- package/dist/cjs/client/auth/path-validator.d.ts +29 -0
- package/dist/cjs/client/auth/path-validator.js +421 -0
- package/dist/cjs/client/auth/path-validator.js.map +1 -0
- package/dist/cjs/client/auth/trust-data.d.ts +24 -0
- package/dist/cjs/client/auth/trust-data.js +97 -0
- package/dist/cjs/client/auth/trust-data.js.map +1 -0
- package/dist/cjs/client/auth/x509.d.ts +109 -0
- package/dist/cjs/client/auth/x509.js +442 -0
- package/dist/cjs/client/auth/x509.js.map +1 -0
- package/dist/cjs/client/cast-client.d.ts +111 -0
- package/dist/cjs/client/cast-client.js +505 -0
- package/dist/cjs/client/cast-client.js.map +1 -0
- package/dist/cjs/client/errors.d.ts +28 -0
- package/dist/cjs/client/errors.js +50 -0
- package/dist/cjs/client/errors.js.map +1 -0
- package/dist/cjs/client/index.d.ts +6 -0
- package/dist/cjs/client/index.js +21 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/client/namespaces.d.ts +9 -0
- package/dist/cjs/client/namespaces.js +13 -0
- package/dist/cjs/client/namespaces.js.map +1 -0
- package/dist/cjs/client/types.d.ts +27 -0
- package/dist/cjs/client/types.js +3 -0
- package/dist/cjs/client/types.js.map +1 -0
- package/dist/cjs/discovery/cast-discovery.d.ts +103 -0
- package/dist/cjs/discovery/cast-discovery.js +323 -0
- package/dist/cjs/discovery/cast-discovery.js.map +1 -0
- package/dist/cjs/discovery/device-cache.d.ts +45 -0
- package/dist/cjs/discovery/device-cache.js +240 -0
- package/dist/cjs/discovery/device-cache.js.map +1 -0
- package/dist/cjs/discovery/dns-packet.d.ts +70 -0
- package/dist/cjs/discovery/dns-packet.js +251 -0
- package/dist/cjs/discovery/dns-packet.js.map +1 -0
- package/dist/cjs/discovery/index.d.ts +4 -0
- package/dist/cjs/discovery/index.js +21 -0
- package/dist/cjs/discovery/index.js.map +1 -0
- package/dist/cjs/discovery/udp-socket.d.ts +16 -0
- package/dist/cjs/discovery/udp-socket.js +163 -0
- package/dist/cjs/discovery/udp-socket.js.map +1 -0
- package/dist/cjs/electron/main.d.ts +86 -0
- package/dist/cjs/electron/main.js +408 -0
- package/dist/cjs/electron/main.js.map +1 -0
- package/dist/cjs/electron/manager-api.d.ts +132 -0
- package/dist/cjs/electron/manager-api.js +207 -0
- package/dist/cjs/electron/manager-api.js.map +1 -0
- package/dist/cjs/electron/preload.d.ts +39 -0
- package/dist/cjs/electron/preload.js +96 -0
- package/dist/cjs/electron/preload.js.map +1 -0
- package/dist/cjs/electron/presentation-envelope.d.ts +60 -0
- package/dist/cjs/electron/presentation-envelope.js +318 -0
- package/dist/cjs/electron/presentation-envelope.js.map +1 -0
- package/dist/cjs/electron/presentation-handler.d.ts +100 -0
- package/dist/cjs/electron/presentation-handler.js +499 -0
- package/dist/cjs/electron/presentation-handler.js.map +1 -0
- package/dist/cjs/electron/session-service.d.ts +174 -0
- package/dist/cjs/electron/session-service.js +891 -0
- package/dist/cjs/electron/session-service.js.map +1 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/polyfill/bridge-types.d.ts +86 -0
- package/dist/cjs/polyfill/bridge-types.js +3 -0
- package/dist/cjs/polyfill/bridge-types.js.map +1 -0
- package/dist/cjs/polyfill/install.d.ts +12 -0
- package/dist/cjs/polyfill/install.js +1569 -0
- package/dist/cjs/polyfill/install.js.map +1 -0
- package/dist/cjs/polyfill/presentation-standin.d.ts +13 -0
- package/dist/cjs/polyfill/presentation-standin.js +279 -0
- package/dist/cjs/polyfill/presentation-standin.js.map +1 -0
- package/dist/cjs/protocol/cast-message.d.ts +20 -0
- package/dist/cjs/protocol/cast-message.js +171 -0
- package/dist/cjs/protocol/cast-message.js.map +1 -0
- package/dist/cjs/protocol/device-auth.d.ts +61 -0
- package/dist/cjs/protocol/device-auth.js +113 -0
- package/dist/cjs/protocol/device-auth.js.map +1 -0
- package/dist/cjs/protocol/errors.d.ts +4 -0
- package/dist/cjs/protocol/errors.js +12 -0
- package/dist/cjs/protocol/errors.js.map +1 -0
- package/dist/cjs/protocol/framing.d.ts +18 -0
- package/dist/cjs/protocol/framing.js +100 -0
- package/dist/cjs/protocol/framing.js.map +1 -0
- package/dist/cjs/protocol/index.d.ts +4 -0
- package/dist/cjs/protocol/index.js +21 -0
- package/dist/cjs/protocol/index.js.map +1 -0
- package/dist/cjs/protocol/proto-wire.d.ts +11 -0
- package/dist/cjs/protocol/proto-wire.js +64 -0
- package/dist/cjs/protocol/proto-wire.js.map +1 -0
- package/dist/client/auth/build-time.d.ts +7 -0
- package/dist/client/auth/build-time.js +8 -0
- package/dist/client/auth/build-time.js.map +1 -0
- package/dist/client/auth/cast-auth.d.ts +44 -0
- package/dist/client/auth/cast-auth.js +141 -0
- package/dist/client/auth/cast-auth.js.map +1 -0
- package/dist/client/auth/cast-cert-validator.d.ts +34 -0
- package/dist/client/auth/cast-cert-validator.js +86 -0
- package/dist/client/auth/cast-cert-validator.js.map +1 -0
- package/dist/client/auth/crl.d.ts +45 -0
- package/dist/client/auth/crl.js +221 -0
- package/dist/client/auth/crl.js.map +1 -0
- package/dist/client/auth/der.d.ts +62 -0
- package/dist/client/auth/der.js +196 -0
- package/dist/client/auth/der.js.map +1 -0
- package/dist/client/auth/names.d.ts +52 -0
- package/dist/client/auth/names.js +438 -0
- package/dist/client/auth/names.js.map +1 -0
- package/dist/client/auth/path-validator.d.ts +29 -0
- package/dist/client/auth/path-validator.js +417 -0
- package/dist/client/auth/path-validator.js.map +1 -0
- package/dist/client/auth/trust-data.d.ts +24 -0
- package/dist/client/auth/trust-data.js +94 -0
- package/dist/client/auth/trust-data.js.map +1 -0
- package/dist/client/auth/x509.d.ts +109 -0
- package/dist/client/auth/x509.js +430 -0
- package/dist/client/auth/x509.js.map +1 -0
- package/dist/client/cast-client.d.ts +20 -1
- package/dist/client/cast-client.js +74 -3
- package/dist/client/cast-client.js.map +1 -1
- package/dist/client/errors.d.ts +11 -0
- package/dist/client/errors.js +13 -0
- package/dist/client/errors.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/discovery/cast-discovery.d.ts +21 -2
- package/dist/discovery/cast-discovery.js +94 -14
- package/dist/discovery/cast-discovery.js.map +1 -1
- package/dist/discovery/device-cache.d.ts +6 -1
- package/dist/discovery/device-cache.js +31 -7
- package/dist/discovery/device-cache.js.map +1 -1
- package/dist/discovery/udp-socket.d.ts +5 -1
- package/dist/discovery/udp-socket.js +56 -5
- package/dist/discovery/udp-socket.js.map +1 -1
- package/dist/electron/main.d.ts +26 -4
- package/dist/electron/main.js +191 -54
- package/dist/electron/main.js.map +1 -1
- package/dist/electron/manager-api.d.ts +132 -0
- package/dist/electron/manager-api.js +198 -0
- package/dist/electron/manager-api.js.map +1 -0
- package/dist/electron/preload.d.ts +5 -0
- package/dist/electron/preload.js +9 -1
- package/dist/electron/preload.js.map +1 -1
- package/dist/electron/presentation-envelope.js +7 -1
- package/dist/electron/presentation-envelope.js.map +1 -1
- package/dist/electron/presentation-handler.js +16 -9
- package/dist/electron/presentation-handler.js.map +1 -1
- package/dist/electron/session-service.d.ts +42 -1
- package/dist/electron/session-service.js +226 -23
- package/dist/electron/session-service.js.map +1 -1
- package/dist/polyfill/presentation-standin.js +3 -2
- package/dist/polyfill/presentation-standin.js.map +1 -1
- package/dist/protocol/device-auth.d.ts +61 -0
- package/dist/protocol/device-auth.js +106 -0
- package/dist/protocol/device-auth.js.map +1 -0
- package/dist/protocol/index.d.ts +1 -0
- package/dist/protocol/index.js +1 -0
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/proto-wire.d.ts +11 -0
- package/dist/protocol/proto-wire.js +60 -0
- package/dist/protocol/proto-wire.js.map +1 -0
- package/package.json +47 -12
- package/src/client/auth/build-time.ts +7 -0
- package/src/client/auth/cast-auth.ts +184 -0
- package/src/client/auth/cast-cert-validator.ts +133 -0
- package/src/client/auth/crl.ts +228 -0
- package/src/client/auth/der.ts +193 -0
- package/src/client/auth/names.ts +411 -0
- package/src/client/auth/path-validator.ts +449 -0
- package/src/client/auth/trust-data.ts +95 -0
- package/src/client/auth/x509.ts +488 -0
- package/src/client/cast-client.ts +85 -3
- package/src/client/errors.ts +29 -0
- package/src/client/index.ts +2 -0
- package/src/discovery/cast-discovery.ts +104 -19
- package/src/discovery/device-cache.ts +38 -8
- package/src/discovery/udp-socket.ts +63 -4
- package/src/electron/main.ts +218 -59
- package/src/electron/manager-api.ts +312 -0
- package/src/electron/preload.ts +15 -1
- package/src/electron/presentation-envelope.ts +7 -1
- package/src/electron/presentation-handler.ts +16 -10
- package/src/electron/session-service.ts +230 -26
- package/src/polyfill/presentation-standin.ts +3 -2
- package/src/protocol/device-auth.ts +126 -0
- package/src/protocol/index.ts +1 -0
- package/src/protocol/proto-wire.ts +55 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import type { KeyObject } from "node:crypto";
|
|
2
|
+
import {
|
|
3
|
+
criticalPoliciesHandled,
|
|
4
|
+
isSelfIssued,
|
|
5
|
+
keyUsageAsserts,
|
|
6
|
+
KEY_USAGE_BIT,
|
|
7
|
+
OID,
|
|
8
|
+
parseAcceptablePublicKey,
|
|
9
|
+
parseSignatureAlgorithm,
|
|
10
|
+
sameSignatureAlgorithm,
|
|
11
|
+
verifySignedData,
|
|
12
|
+
type ParsedCertificate,
|
|
13
|
+
} from "./x509.ts";
|
|
14
|
+
import { DerReader } from "./der.ts";
|
|
15
|
+
import { namesEqual } from "./names.ts";
|
|
16
|
+
import type { NameConstraints } from "./names.ts";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* RFC 5280 certificate path validation as BoringSSL implements it (pki/verify_certificate_chain.cc, PathVerifier),
|
|
20
|
+
* which is what Chromium's Cast verification runs (cast_cert_validator.cc builds a bssl::CertPathBuilder over it).
|
|
21
|
+
* The delegate is Chromium's CastPathBuilderDelegate (RSA moduli of at least 2048 bits, SHA-1 allowed), the trust
|
|
22
|
+
* anchors are added "with constraints" and without expiry enforcement (CastTrustStore::AddAnchor), and the user
|
|
23
|
+
* initial policy set is {anyPolicy} with no inhibit flags.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export type KeyPurpose = "client-auth" | "any";
|
|
27
|
+
|
|
28
|
+
/** The errors a path accumulated; `date` marks kValidityFailedNotBefore/NotAfter, which Chromium reports separately. */
|
|
29
|
+
export interface PathErrors {
|
|
30
|
+
messages: string[];
|
|
31
|
+
date: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// --- The valid policy graph (RFC 5280 6.1.2's valid_policy_tree) -----------------------------------------------
|
|
35
|
+
|
|
36
|
+
interface PolicyNode {
|
|
37
|
+
parents: string[];
|
|
38
|
+
mapped: boolean;
|
|
39
|
+
reachable: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface LevelDetails {
|
|
43
|
+
expected: Map<string, string[]>;
|
|
44
|
+
hasAny: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class ValidPolicyGraph {
|
|
48
|
+
private levels: Map<string, PolicyNode>[] = [];
|
|
49
|
+
private current: LevelDetails = { expected: new Map(), hasAny: false };
|
|
50
|
+
|
|
51
|
+
init(): void {
|
|
52
|
+
this.setNull();
|
|
53
|
+
this.startLevel();
|
|
54
|
+
this.addAnyPolicyNode();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
isNull(): boolean {
|
|
58
|
+
const last = this.levels[this.levels.length - 1];
|
|
59
|
+
return !this.current.hasAny && (last === undefined || last.size === 0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setNull(): void {
|
|
63
|
+
this.levels = [];
|
|
64
|
+
this.current = { expected: new Map(), hasAny: false };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
startLevel(): LevelDetails {
|
|
68
|
+
const last = this.levels[this.levels.length - 1];
|
|
69
|
+
if (last !== undefined) {
|
|
70
|
+
for (const [policy, node] of last) {
|
|
71
|
+
if (!node.mapped) this.expect(policy, policy);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const previous = this.current;
|
|
75
|
+
this.levels.push(new Map());
|
|
76
|
+
this.current = { expected: new Map(), hasAny: false };
|
|
77
|
+
return previous;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private expect(subjectPolicy: string, issuerPolicy: string): void {
|
|
81
|
+
const list = this.current.expected.get(subjectPolicy);
|
|
82
|
+
if (list === undefined) this.current.expected.set(subjectPolicy, [issuerPolicy]);
|
|
83
|
+
else list.push(issuerPolicy);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** GetUserConstrainedPolicySet with the initial policy set {anyPolicy}. */
|
|
87
|
+
userConstrainedPolicySetIsEmpty(): boolean {
|
|
88
|
+
if (this.levels.length === 0) return true;
|
|
89
|
+
if (this.current.hasAny) return false;
|
|
90
|
+
const last = this.levels[this.levels.length - 1] as Map<string, PolicyNode>;
|
|
91
|
+
for (const node of last.values()) node.reachable = true;
|
|
92
|
+
let count = 0;
|
|
93
|
+
for (let i = this.levels.length - 1; i >= 0; i--) {
|
|
94
|
+
for (const node of (this.levels[i] as Map<string, PolicyNode>).values()) {
|
|
95
|
+
if (!node.reachable) continue;
|
|
96
|
+
if (node.parents.length === 0) {
|
|
97
|
+
count++;
|
|
98
|
+
} else if (i > 0) {
|
|
99
|
+
for (const parent of node.parents) {
|
|
100
|
+
const p = (this.levels[i - 1] as Map<string, PolicyNode>).get(parent);
|
|
101
|
+
if (p !== undefined) p.reachable = true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return count === 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
addAnyPolicyNode(): void {
|
|
110
|
+
this.current.hasAny = true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
addNode(policy: string, parents: string[]): void {
|
|
114
|
+
const last = this.levels[this.levels.length - 1];
|
|
115
|
+
if (last !== undefined && !last.has(policy)) last.set(policy, { parents, mapped: false, reachable: false });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
addPolicyMapping(issuerPolicy: string, subjectPolicy: string): void {
|
|
119
|
+
const last = this.levels[this.levels.length - 1];
|
|
120
|
+
if (last === undefined) return;
|
|
121
|
+
let node = last.get(issuerPolicy);
|
|
122
|
+
if (node === undefined) {
|
|
123
|
+
if (!this.current.hasAny) return;
|
|
124
|
+
node = { parents: [], mapped: false, reachable: false };
|
|
125
|
+
last.set(issuerPolicy, node);
|
|
126
|
+
}
|
|
127
|
+
node.mapped = true;
|
|
128
|
+
this.expect(subjectPolicy, issuerPolicy);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
deleteNode(policy: string): void {
|
|
132
|
+
this.levels[this.levels.length - 1]?.delete(policy);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// --- The verifier ---------------------------------------------------------------------------------------------
|
|
137
|
+
|
|
138
|
+
class PathVerifier {
|
|
139
|
+
private readonly graph = new ValidPolicyGraph();
|
|
140
|
+
private nameConstraints: NameConstraints[] = [];
|
|
141
|
+
private explicitPolicy = 0;
|
|
142
|
+
private inhibitAnyPolicy = 0;
|
|
143
|
+
private policyMapping = 0;
|
|
144
|
+
private maxPathLength = 0;
|
|
145
|
+
private workingIssuer: ParsedCertificate | undefined;
|
|
146
|
+
private workingKey: KeyObject | undefined;
|
|
147
|
+
|
|
148
|
+
private readonly errors: PathErrors;
|
|
149
|
+
private readonly time: number;
|
|
150
|
+
private readonly purpose: KeyPurpose;
|
|
151
|
+
|
|
152
|
+
constructor(errors: PathErrors, time: number, purpose: KeyPurpose) {
|
|
153
|
+
this.errors = errors;
|
|
154
|
+
this.time = time;
|
|
155
|
+
this.purpose = purpose;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
private error(message: string): void {
|
|
159
|
+
this.errors.messages.push(message);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** VerifyTimeValidity. */
|
|
163
|
+
private verifyTime(cert: ParsedCertificate): void {
|
|
164
|
+
if (this.time < cert.notBefore) {
|
|
165
|
+
this.error("certificate is not yet valid");
|
|
166
|
+
this.errors.date = true;
|
|
167
|
+
}
|
|
168
|
+
if (cert.notAfter < this.time) {
|
|
169
|
+
this.error("certificate has expired");
|
|
170
|
+
this.errors.date = true;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** VerifyExtendedKeyUsage, for the key purposes Cast uses (ANY_EKU skips the check). */
|
|
175
|
+
private verifyEku(cert: ParsedCertificate): void {
|
|
176
|
+
if (this.purpose === "any") return;
|
|
177
|
+
const eku = cert.extendedKeyUsage;
|
|
178
|
+
if (eku === undefined) return;
|
|
179
|
+
// KeyPurpose::CLIENT_AUTH: an EKU without clientAuth or anyExtendedKeyUsage is an error. (Prohibited-purpose and
|
|
180
|
+
// anyEKU-without-clientAuth findings are warnings for the non-strict purposes.)
|
|
181
|
+
if (!eku.includes(OID.CLIENT_AUTH) && !eku.includes(OID.ANY_EKU)) this.error("extended key usage lacks clientAuth");
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** VerifyNoUnconsumedCriticalExtensions. */
|
|
185
|
+
private verifyNoUnconsumedCritical(cert: ParsedCertificate): void {
|
|
186
|
+
for (const ext of cert.extensions.values()) {
|
|
187
|
+
if (!ext.critical) continue;
|
|
188
|
+
if (ext.oid === OID.MS_APPLICATION_POLICIES && cert.extendedKeyUsage !== undefined) continue;
|
|
189
|
+
const handled =
|
|
190
|
+
ext.oid === OID.BASIC_CONSTRAINTS ||
|
|
191
|
+
ext.oid === OID.KEY_USAGE ||
|
|
192
|
+
ext.oid === OID.EXT_KEY_USAGE ||
|
|
193
|
+
ext.oid === OID.NAME_CONSTRAINTS ||
|
|
194
|
+
ext.oid === OID.SUBJECT_ALT_NAME ||
|
|
195
|
+
(ext.oid === OID.CERTIFICATE_POLICIES && criticalPoliciesHandled(ext.value)) ||
|
|
196
|
+
ext.oid === OID.POLICY_MAPPINGS ||
|
|
197
|
+
ext.oid === OID.POLICY_CONSTRAINTS ||
|
|
198
|
+
ext.oid === OID.INHIBIT_ANY_POLICY;
|
|
199
|
+
if (!handled) this.error(`unconsumed critical extension ${ext.oid}`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** ParseAndCheckPublicKey. */
|
|
204
|
+
private checkPublicKey(cert: ParsedCertificate): KeyObject | undefined {
|
|
205
|
+
const key = parseAcceptablePublicKey(cert.spkiTlv);
|
|
206
|
+
if (key === undefined) this.error("public key is unparseable or unacceptable (RSA of at least 2048 bits, or P-256/384/521)");
|
|
207
|
+
return key;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
private verifyPolicies(cert: ParsedCertificate, isTarget: boolean): void {
|
|
211
|
+
if (cert.policyOids !== undefined && !this.graph.isNull()) {
|
|
212
|
+
const previous = this.graph.startLevel();
|
|
213
|
+
let certHasAny = false;
|
|
214
|
+
for (const oid of cert.policyOids) {
|
|
215
|
+
if (oid === OID.ANY_POLICY) {
|
|
216
|
+
certHasAny = true;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const parents = previous.expected.get(oid);
|
|
220
|
+
if (parents !== undefined) {
|
|
221
|
+
this.graph.addNode(oid, parents);
|
|
222
|
+
previous.expected.delete(oid);
|
|
223
|
+
} else if (previous.hasAny) {
|
|
224
|
+
this.graph.addNode(oid, []);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (certHasAny && (this.inhibitAnyPolicy > 0 || (!isTarget && isSelfIssued(cert)))) {
|
|
228
|
+
for (const [oid, parents] of previous.expected) this.graph.addNode(oid, parents);
|
|
229
|
+
if (previous.hasAny) this.graph.addAnyPolicyNode();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (cert.policyOids === undefined) this.graph.setNull();
|
|
233
|
+
if (!(this.explicitPolicy > 0 || !this.graph.isNull())) this.error("no valid policy");
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private verifyPolicyMappings(cert: ParsedCertificate): void {
|
|
237
|
+
const mappings = cert.policyMappings;
|
|
238
|
+
if (mappings === undefined) return;
|
|
239
|
+
for (const m of mappings) {
|
|
240
|
+
if (m.issuerDomainPolicy === OID.ANY_POLICY || m.subjectDomainPolicy === OID.ANY_POLICY) {
|
|
241
|
+
this.graph.setNull();
|
|
242
|
+
this.error("policy mapping involves anyPolicy");
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (this.policyMapping > 0) {
|
|
247
|
+
for (const m of mappings) this.graph.addPolicyMapping(m.issuerDomainPolicy, m.subjectDomainPolicy);
|
|
248
|
+
}
|
|
249
|
+
if (this.policyMapping === 0) {
|
|
250
|
+
for (const m of mappings) this.graph.deleteNode(m.issuerDomainPolicy);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
private applyPolicyConstraints(cert: ParsedCertificate): void {
|
|
255
|
+
const pc = cert.policyConstraints;
|
|
256
|
+
if (pc !== undefined) {
|
|
257
|
+
if (pc.requireExplicitPolicy !== undefined && pc.requireExplicitPolicy < this.explicitPolicy) this.explicitPolicy = pc.requireExplicitPolicy;
|
|
258
|
+
if (pc.inhibitPolicyMapping !== undefined && pc.inhibitPolicyMapping < this.policyMapping) this.policyMapping = pc.inhibitPolicyMapping;
|
|
259
|
+
}
|
|
260
|
+
if (cert.inhibitAnyPolicy !== undefined && cert.inhibitAnyPolicy < this.inhibitAnyPolicy) this.inhibitAnyPolicy = cert.inhibitAnyPolicy;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** ProcessRootCertificate + ApplyTrustAnchorConstraints (anchor expiry is not enforced). */
|
|
264
|
+
private processRoot(cert: ParsedCertificate): void {
|
|
265
|
+
if (cert.policyOids !== undefined) this.verifyPolicies(cert, false);
|
|
266
|
+
this.verifyPolicyMappings(cert);
|
|
267
|
+
this.applyPolicyConstraints(cert);
|
|
268
|
+
if (cert.keyUsage !== undefined && !keyUsageAsserts(cert.keyUsage, KEY_USAGE_BIT.KEY_CERT_SIGN)) this.error("keyCertSign not set");
|
|
269
|
+
this.verifyEku(cert);
|
|
270
|
+
if (cert.nameConstraints !== undefined) this.nameConstraints.push(cert.nameConstraints);
|
|
271
|
+
if (cert.basicConstraints !== undefined) {
|
|
272
|
+
if (!cert.basicConstraints.isCa) this.error("basicConstraints indicates not a CA");
|
|
273
|
+
if (cert.basicConstraints.pathLen !== undefined) this.maxPathLength = cert.basicConstraints.pathLen;
|
|
274
|
+
}
|
|
275
|
+
this.verifyNoUnconsumedCritical(cert);
|
|
276
|
+
this.workingIssuer = cert;
|
|
277
|
+
this.workingKey = this.checkPublicKey(cert);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/** BasicCertificateProcessing. Returns true when verification of the rest of the path should stop. */
|
|
281
|
+
private basicProcessing(cert: ParsedCertificate, isTarget: boolean): boolean {
|
|
282
|
+
let shortCircuit = false;
|
|
283
|
+
// RFC 5280 4.1.1.2 / 4.1.2.3: Certificate.signatureAlgorithm must match TBSCertificate.signature.
|
|
284
|
+
if (!cert.signatureAlgorithmTlv.equals(cert.tbsSignatureAlgorithmTlv)) {
|
|
285
|
+
const tbsAlg = parseAlg(cert.tbsSignatureAlgorithmTlv);
|
|
286
|
+
if (cert.signatureAlgorithm === undefined || tbsAlg === undefined) {
|
|
287
|
+
this.error("unacceptable signature algorithm");
|
|
288
|
+
shortCircuit = true;
|
|
289
|
+
} else if (!sameSignatureAlgorithm(cert.signatureAlgorithm, tbsAlg)) {
|
|
290
|
+
this.error("signature algorithms do not match");
|
|
291
|
+
shortCircuit = true;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (cert.signatureAlgorithm === undefined) {
|
|
295
|
+
this.error("unacceptable signature algorithm");
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
if (this.workingKey !== undefined) {
|
|
299
|
+
if (!verifySignedData(cert.signatureAlgorithm, cert.tbsTlv, cert.signatureValue, this.workingKey)) {
|
|
300
|
+
this.error("signature verification failed");
|
|
301
|
+
shortCircuit = true;
|
|
302
|
+
}
|
|
303
|
+
} else {
|
|
304
|
+
shortCircuit = true;
|
|
305
|
+
}
|
|
306
|
+
if (shortCircuit) return true;
|
|
307
|
+
|
|
308
|
+
this.verifyTime(cert);
|
|
309
|
+
if (!namesEqual(cert.normalizedIssuer, (this.workingIssuer as ParsedCertificate).normalizedSubject)) {
|
|
310
|
+
this.error("subject does not match issuer");
|
|
311
|
+
}
|
|
312
|
+
if (this.nameConstraints.length > 0 && (!isSelfIssued(cert) || isTarget)) {
|
|
313
|
+
for (const nc of this.nameConstraints) {
|
|
314
|
+
if (!nc.isPermittedCert(cert.normalizedSubject, cert.subjectContent, cert.subjectAltNames)) this.error("not permitted by name constraints");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
this.verifyPolicies(cert, isTarget);
|
|
318
|
+
this.verifyEku(cert);
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/** PrepareForNextCertificate (an intermediate). */
|
|
323
|
+
private prepareForNext(cert: ParsedCertificate): void {
|
|
324
|
+
this.verifyPolicyMappings(cert);
|
|
325
|
+
this.workingIssuer = cert;
|
|
326
|
+
this.workingKey = this.checkPublicKey(cert);
|
|
327
|
+
if (cert.nameConstraints !== undefined) this.nameConstraints.push(cert.nameConstraints);
|
|
328
|
+
if (!isSelfIssued(cert)) {
|
|
329
|
+
if (this.explicitPolicy > 0) this.explicitPolicy -= 1;
|
|
330
|
+
if (this.policyMapping > 0) this.policyMapping -= 1;
|
|
331
|
+
if (this.inhibitAnyPolicy > 0) this.inhibitAnyPolicy -= 1;
|
|
332
|
+
}
|
|
333
|
+
this.applyPolicyConstraints(cert);
|
|
334
|
+
if (cert.basicConstraints === undefined) this.error("missing basicConstraints");
|
|
335
|
+
else if (!cert.basicConstraints.isCa) this.error("basicConstraints indicates not a CA");
|
|
336
|
+
if (!isSelfIssued(cert)) {
|
|
337
|
+
if (this.maxPathLength === 0) this.error("maximum path length violated");
|
|
338
|
+
else this.maxPathLength -= 1;
|
|
339
|
+
}
|
|
340
|
+
if (cert.basicConstraints?.pathLen !== undefined && cert.basicConstraints.pathLen < this.maxPathLength) {
|
|
341
|
+
this.maxPathLength = cert.basicConstraints.pathLen;
|
|
342
|
+
}
|
|
343
|
+
if (cert.keyUsage !== undefined && !keyUsageAsserts(cert.keyUsage, KEY_USAGE_BIT.KEY_CERT_SIGN)) this.error("keyCertSign not set");
|
|
344
|
+
this.verifyNoUnconsumedCritical(cert);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** WrapUp (the target). */
|
|
348
|
+
private wrapUp(cert: ParsedCertificate): void {
|
|
349
|
+
if (this.explicitPolicy > 0) this.explicitPolicy -= 1;
|
|
350
|
+
if (cert.policyConstraints?.requireExplicitPolicy === 0) this.explicitPolicy = 0;
|
|
351
|
+
this.verifyNoUnconsumedCritical(cert);
|
|
352
|
+
if (this.explicitPolicy === 0 && this.graph.userConstrainedPolicySetIsEmpty()) this.error("no valid policy");
|
|
353
|
+
// VerifyTargetCertIsNotCA is only a warning for CLIENT_AUTH.
|
|
354
|
+
this.checkPublicKey(cert);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/** PathVerifier::Run for `path` ordered target first, trust anchor last. */
|
|
358
|
+
run(path: ParsedCertificate[]): void {
|
|
359
|
+
const n = path.length - 1;
|
|
360
|
+
this.graph.init();
|
|
361
|
+
this.explicitPolicy = n + 1;
|
|
362
|
+
this.inhibitAnyPolicy = n + 1;
|
|
363
|
+
this.policyMapping = n + 1;
|
|
364
|
+
this.maxPathLength = n;
|
|
365
|
+
for (let i = 0; i < path.length; i++) {
|
|
366
|
+
const cert = path[path.length - i - 1] as ParsedCertificate;
|
|
367
|
+
const isTarget = i === path.length - 1;
|
|
368
|
+
if (i === 0) {
|
|
369
|
+
this.processRoot(cert);
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
if (this.basicProcessing(cert, isTarget)) return;
|
|
373
|
+
if (!isTarget) this.prepareForNext(cert);
|
|
374
|
+
else this.wrapUp(cert);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function parseAlg(bytes: Buffer) {
|
|
380
|
+
try {
|
|
381
|
+
return parseSignatureAlgorithm(new DerReader(bytes).read());
|
|
382
|
+
} catch {
|
|
383
|
+
return undefined;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** Verify one candidate path (target first, trust anchor last) at `time`. */
|
|
388
|
+
export function verifyCertificatePath(path: ParsedCertificate[], time: number, purpose: KeyPurpose): PathErrors {
|
|
389
|
+
const errors: PathErrors = { messages: [], date: false };
|
|
390
|
+
new PathVerifier(errors, time, purpose).run(path);
|
|
391
|
+
return errors;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// --- Path building --------------------------------------------------------------------------------------------
|
|
395
|
+
|
|
396
|
+
export interface PathBuildResult {
|
|
397
|
+
/** The first valid path, target first and the trust anchor last. */
|
|
398
|
+
path: ParsedCertificate[] | undefined;
|
|
399
|
+
/** Whether any candidate path reached a trust anchor (so failures are about the chain, not about trust). */
|
|
400
|
+
reachedAnchor: boolean;
|
|
401
|
+
/** Errors of the last anchored candidate that failed. */
|
|
402
|
+
errors: PathErrors | undefined;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const MAX_PATH_DEPTH = 20;
|
|
406
|
+
const MAX_CANDIDATES = 1000;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* CertPathBuilder::Run: depth-first search from the target through the supplied intermediates (matched on normalized
|
|
410
|
+
* issuer and subject names) to a trust anchor, verifying each complete candidate and stopping at the first valid one.
|
|
411
|
+
*/
|
|
412
|
+
export function buildAndVerifyPath(
|
|
413
|
+
target: ParsedCertificate,
|
|
414
|
+
intermediates: ParsedCertificate[],
|
|
415
|
+
anchors: ParsedCertificate[],
|
|
416
|
+
time: number,
|
|
417
|
+
purpose: KeyPurpose,
|
|
418
|
+
): PathBuildResult {
|
|
419
|
+
const result: PathBuildResult = { path: undefined, reachedAnchor: false, errors: undefined };
|
|
420
|
+
let candidates = 0;
|
|
421
|
+
|
|
422
|
+
const search = (path: ParsedCertificate[]): boolean => {
|
|
423
|
+
if (candidates >= MAX_CANDIDATES || path.length > MAX_PATH_DEPTH) return false;
|
|
424
|
+
const head = path[path.length - 1] as ParsedCertificate;
|
|
425
|
+
for (const anchor of anchors) {
|
|
426
|
+
if (!namesEqual(anchor.normalizedSubject, head.normalizedIssuer)) continue;
|
|
427
|
+
if (path.some((c) => c.der.equals(anchor.der))) continue;
|
|
428
|
+
candidates++;
|
|
429
|
+
const full = [...path, anchor];
|
|
430
|
+
result.reachedAnchor = true;
|
|
431
|
+
const errors = verifyCertificatePath(full, time, purpose);
|
|
432
|
+
if (errors.messages.length === 0) {
|
|
433
|
+
result.path = full;
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
result.errors = errors;
|
|
437
|
+
}
|
|
438
|
+
for (const candidate of intermediates) {
|
|
439
|
+
if (!namesEqual(candidate.normalizedSubject, head.normalizedIssuer)) continue;
|
|
440
|
+
if (path.some((c) => c.der.equals(candidate.der))) continue;
|
|
441
|
+
if (anchors.some((a) => a.der.equals(candidate.der))) continue;
|
|
442
|
+
if (search([...path, candidate])) return true;
|
|
443
|
+
}
|
|
444
|
+
return false;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
search([target]);
|
|
448
|
+
return result;
|
|
449
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { BUILD_TIME } from "./build-time.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Embedded Cast trust data, copied byte for byte from Chromium
|
|
5
|
+
* (components/media_router/common/providers/cast/certificate/: cast_root_ca_cert_der-inc.h, eureka_root_ca_der-inc.h,
|
|
6
|
+
* cast_crl_root_ca_cert_der-inc.h, cast_fallback_crl.h) and cross-checked against openscreen
|
|
7
|
+
* (cast/common/certificate/) and independent third-party copies.
|
|
8
|
+
*
|
|
9
|
+
* SHA-256 of the DER:
|
|
10
|
+
* Cast Root CA 809af14700b3fe2611ad597eb1584d6354313b64ccdb3390f097fa3e5826d6ca
|
|
11
|
+
* Eureka Root CA caf6d1e37b532203e01a76bf07187bb731ccd38801565ab2211a2c0ab7f3bc46
|
|
12
|
+
* Cast CRL Root CA 8b77c60291f9d62764613083f49750b1c5caac2d9efbe5a28edf301f9d84831d
|
|
13
|
+
* Fallback CRL bundle 2576ba74902221bd1a231a67cc4fc6862bd85d438edec26881fa1f5dfe5e25fc
|
|
14
|
+
*
|
|
15
|
+
* Chromium treats the fallback CRL as valid for 20 weeks from the build time of the binary (base::GetBuildTime()).
|
|
16
|
+
* `npm run build` stamps the package's build time into dist (see build-time.ts); a source checkout and the tests use
|
|
17
|
+
* the date below instead: refresh the fallback CRL and this date together on each release. Once the window lapses, a
|
|
18
|
+
* device that sends no valid CRL of its own is accepted without a revocation check (Chromium refuses it with
|
|
19
|
+
* ERR_FALLBACK_CRL_INVALID; docs/DESIGN.md says why this differs).
|
|
20
|
+
*/
|
|
21
|
+
export const FALLBACK_CRL_DEFAULT_BUILD_TIME = Date.UTC(2026, 10, 24);
|
|
22
|
+
export const FALLBACK_CRL_BUILD_TIME = BUILD_TIME ?? FALLBACK_CRL_DEFAULT_BUILD_TIME;
|
|
23
|
+
|
|
24
|
+
export const CAST_ROOT_CA_B64 = [
|
|
25
|
+
"MIIDxTCCAq2gAwIBAgIBAjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UE",
|
|
26
|
+
"BwwNTW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzENMAsGA1UECwwEQ2FzdDEVMBMGA1UEAwwMQ2FzdCBSb290IENB",
|
|
27
|
+
"MB4XDTE0MDQwMjE3MzQyNloXDTM0MDMyODE3MzQyNlowdTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNV",
|
|
28
|
+
"BAcMDU1vdW50YWluIFZpZXcxEzARBgNVBAoMCkdvb2dsZSBJbmMxDTALBgNVBAsMBENhc3QxFTATBgNVBAMMDENhc3QgUm9vdCBD",
|
|
29
|
+
"QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrZZZ3aOdPBd/bU0K6PWAhoOUqV7XDP/XkIqarl6binLaBnR4qeyc9w",
|
|
30
|
+
"swWHaRHscJiXw+bDw+u9xrA9/E/BXjif2s9zMAZbeTfBXoyHR5SaQZIq1pXEcVwnXQixgMaSvRvjQZeh7HWfVZ4+n48cx2VkB9Oz",
|
|
31
|
+
"lqEEn5HE3gp7bNnIwHgxo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