@browsercore/contracts 0.2.7 → 0.2.9
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 +68 -31
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tcp-transport.d.ts +18 -0
- package/dist/tcp-transport.d.ts.map +1 -1
- package/dist/tls-engine.d.ts +51 -3
- package/dist/tls-engine.d.ts.map +1 -1
- package/dist/tls-engine.js +6 -1
- package/dist/tls-engine.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# @browsercore/contracts
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@browsercore/contracts)
|
|
4
|
-
[](https://jverneuer.github.io/browsercore-contracts/COVERAGE.md)
|
|
5
4
|
[](https://github.com/jverneuer/browsercore-contracts/actions/workflows/ci.yml)
|
|
6
|
-
[](LICENSE)
|
|
7
5
|
|
|
8
6
|
The canonical interface package for the browsercore stack. Every protocol
|
|
9
|
-
package, runtime adapter, and consumer depends on these contracts
|
|
7
|
+
package, runtime adapter, and consumer depends on these contracts; they
|
|
10
8
|
define how components communicate without coupling them to each other. As of
|
|
11
9
|
0.2.5 this is the canonical single definition for `Transport`,
|
|
12
10
|
`CryptoProvider`, and `CompressionProvider` (the implementing packages
|
|
@@ -17,7 +15,13 @@ telemetry, network). As of 0.2.6: every `Platform` bundle is **optional**
|
|
|
17
15
|
sibling-local shapes), `TlsHandshakeEngine` is the contracts-level seam that
|
|
18
16
|
lets quic drive a TLS handshake without importing `@browsercore/tls`, and the
|
|
19
17
|
`ProxyConfig` family / `ProfileId` / `CookieJarConsumer` config types have
|
|
20
|
-
their canonical homes here (owning packages alias next wave).
|
|
18
|
+
their canonical homes here (owning packages alias next wave). As of 0.2.8 the
|
|
19
|
+
certificate mirror is canonical too: `CertificateSignatureAlgorithm` (and
|
|
20
|
+
`Certificate.selfSigned`) land here, and tls 0.4.19 imports and re-exports
|
|
21
|
+
this type from `@browsercore/contracts` (earlier tls versions declared a
|
|
22
|
+
structurally identical local union) — one definition, not a second
|
|
23
|
+
`Certificate` beside the engine contract.
|
|
24
|
+
Deliberately
|
|
21
25
|
package-local surfaces that remain duplicated (e.g. the full `CookieJar`)
|
|
22
26
|
are documented as such at each definition.
|
|
23
27
|
|
|
@@ -31,9 +35,9 @@ cross-package interface here, a type error becomes a compile error the moment
|
|
|
31
35
|
any package diverges.
|
|
32
36
|
|
|
33
37
|
**Alternative implementations welcome.** The contracts define exactly what a
|
|
34
|
-
component must satisfy
|
|
38
|
+
component must satisfy, nothing more. Want to write a different transport?
|
|
35
39
|
Implement `Transport`. A different crypto backend? Implement
|
|
36
|
-
`CryptoProvider` (synchronous
|
|
40
|
+
`CryptoProvider` (synchronous; WebCrypto cannot satisfy it, see
|
|
37
41
|
[docs/design-decisions.md](docs/design-decisions.md) for why that is
|
|
38
42
|
deliberate and what an async future would cost). A
|
|
39
43
|
different runtime (Bun, Deno, Workers)? Implement the `Platform` service
|
|
@@ -47,7 +51,7 @@ and plain data.
|
|
|
47
51
|
## Architecture
|
|
48
52
|
|
|
49
53
|
```
|
|
50
|
-
@browsercore/contracts (this package
|
|
54
|
+
@browsercore/contracts (this package: interfaces, services, models)
|
|
51
55
|
▲
|
|
52
56
|
│
|
|
53
57
|
┌──────┼─────────────────────────────┐
|
|
@@ -57,10 +61,10 @@ transport tls http1 http2 http3 quic fetch crypto compression
|
|
|
57
61
|
│ │ │ │ │ │ │ │ │
|
|
58
62
|
└─────────┴──────┴───────┴───────┴───────┴───────┴────────┴─────────┘
|
|
59
63
|
▼
|
|
60
|
-
browsersmith (composition root
|
|
64
|
+
browsersmith (composition root, builds Platform)
|
|
61
65
|
```
|
|
62
66
|
|
|
63
|
-
Dependency direction is strictly upward
|
|
67
|
+
Dependency direction is strictly upward; contracts is the root dependency.
|
|
64
68
|
`browsersmith` is the **only** package allowed `node:*` imports; it builds a
|
|
65
69
|
`Platform` object that threads runtime capabilities (network, crypto,
|
|
66
70
|
compression, events, telemetry, time) down through options.
|
|
@@ -69,21 +73,21 @@ compression, events, telemetry, time) down through options.
|
|
|
69
73
|
|
|
70
74
|
| Module | Purpose | Key exports |
|
|
71
75
|
|---|---|---|
|
|
72
|
-
| **Contracts** | Canonical provider interfaces
|
|
73
|
-
| **Platform** | The composition root + per-service bundles
|
|
76
|
+
| **Contracts** | Canonical provider interfaces, the single definitions the implementing packages re-export | `CryptoProvider`, `CompressionProvider`, `Transport`, `DatagramTransport`, `UdpSocketFactory`, `CookieJar`, `PacketCallback` |
|
|
77
|
+
| **Platform** | The composition root + per-service bundles, **every bundle optional** | `Platform`, `PlatformOptions`, `Network`, `Crypto`, `Compression` |
|
|
74
78
|
| **Events** | Structural emitter interface (a method surface, **not** EventTarget-backed) injected via `Platform.events` | `EventProvider`, `TypedEventEmitter<T>` |
|
|
75
79
|
| **Time** | THE canonical Clock (wall + monotonic + sleep + timers) and the Duration/Scheduler helpers | `Clock`, `TimerHandle`, `Time`, `Duration`, `Scheduler`, `Deadline` |
|
|
76
|
-
| **TLS Engine** | The quic↔tls handshake seam
|
|
80
|
+
| **TLS Engine** | The quic↔tls handshake seam; protocol packages never import each other | `TlsHandshakeEngine`, `TlsHandshakeContext`, `ClientHelloConfig`, `ServerHello`, `Certificate`, `CertificateSignatureAlgorithm`, `CipherSuite`, `NamedGroup`, `SignatureScheme`, `AeadAlgorithm`, `ProtocolVersion`, `KeyPair`, `TrafficSecrets`, `ApplicationTrafficSecrets`, `HandshakePhase`, `AlertLevel` |
|
|
77
81
|
| **Config** | Canonical configuration types (owning packages alias next wave) | `ProxyConfig`, `ProxyScheme`, `ProxyTarget`, `ProxyCredentials`, `CookieJarConsumer` |
|
|
78
82
|
| **Telemetry** | OTel-aligned observability | `Logger`, `Tracer`, `Span`, `Metrics`, `Telemetry` |
|
|
79
83
|
| **Models** | Shared data structures that cross package boundaries | `BrowserProfile`, `TlsProfile`, `Http1Profile`, `Http2Profile`, `ProfileId`, `Request`, `Response`, `Headers`, `Cookie`, `TransportState`, `CloseReason`, `ContentEncoding` |
|
|
80
|
-
| **Net** | Platform-agnostic TCP + DNS contracts for runtime portability | `Net`, `DnsResolver`, `Socket`, `ConnectOptions`, `IPAddress` |
|
|
84
|
+
| **Net** | Platform-agnostic TCP + DNS contracts for runtime portability (`DnsResolver.lookupAll?` — optional single dual-family lookup) | `Net`, `DnsResolver`, `Socket`, `ConnectOptions`, `IPAddress` |
|
|
81
85
|
| **IANA Tables** | Canonical TLS wire code lookup tables (single source of truth) | `CIPHER_SUITE_CODES`, `NAMED_GROUP_CODES`, `SIGNATURE_SCHEME_CODES`, `VERSION_CODES` |
|
|
82
86
|
|
|
83
87
|
The former "Protocol Connection Contracts" (`TlsConnection`, `Http1Connection`,
|
|
84
88
|
`Http2Connection`, `Http3Connection`, `QuicConnection`, `QuicStream`,
|
|
85
89
|
`FetchClient`) and the Options layer (`TlsOptions` … `FetchClientOptions`) were
|
|
86
|
-
removed in 0.2.5
|
|
90
|
+
removed in 0.2.5. They had zero consumers, since every consumer binds the
|
|
87
91
|
implementation-local types exported by the protocol packages themselves
|
|
88
92
|
(replaceability audit, 2026-11-16). `Transport` and `CryptoProvider` here are
|
|
89
93
|
now the canonical single definitions that `@browsercore/transport` and
|
|
@@ -91,36 +95,36 @@ now the canonical single definitions that `@browsercore/transport` and
|
|
|
91
95
|
|
|
92
96
|
## Platform semantics (0.2.6)
|
|
93
97
|
|
|
94
|
-
**Every `Platform` bundle is optional**
|
|
95
|
-
`compression?`, `events?`, `telemetry?`, `time?`
|
|
98
|
+
**Every `Platform` bundle is optional** (`network?`, `crypto?`,
|
|
99
|
+
`compression?`, `events?`, `telemetry?`, `time?`), and every `Network`
|
|
96
100
|
member is optional (`tcp?`, `dns?`, `udp?`). A platform carries exactly the
|
|
97
101
|
capabilities its runtime has; nothing has to be faked. The contract is:
|
|
98
102
|
|
|
99
103
|
- **Consumers resolve what they use and throw typed errors naming the
|
|
100
104
|
missing capability.** `@browsercore/fetch`'s `proxyDialPlatform`
|
|
101
105
|
(`fetch/src/proxy.ts`) demonstrated the pattern while the fields were
|
|
102
|
-
still required
|
|
106
|
+
still required; untouched bundles were throwing getters naming the
|
|
103
107
|
culprit. With optional bundles the same guarantee is expressed by
|
|
104
108
|
omitting the field, and consumers write
|
|
105
109
|
`platform.network?.tcp ?? throw missingCapability("platform.network.tcp")`.
|
|
106
|
-
- **Implementers may provide everything
|
|
110
|
+
- **Implementers may provide everything**: an implementation providing
|
|
107
111
|
more than a consumer requires (e.g. `browsersmith`'s `createPlatform()`)
|
|
108
112
|
always satisfies the interface. Optionality removes the obligation to
|
|
109
113
|
fake capabilities, never the permission to supply them.
|
|
110
114
|
|
|
111
115
|
**UDP is a factory, not an instance.** `Network.udp` is a
|
|
112
|
-
`UdpSocketFactory
|
|
116
|
+
`UdpSocketFactory`: `connect(address)` returns a per-connection
|
|
113
117
|
`DatagramTransport`. The previous instance shape (`udp: DatagramTransport`)
|
|
114
118
|
forced the composition root to bind one socket at module-import time
|
|
115
|
-
(browsersmith's import-time `createSocket("udp4")` singleton
|
|
119
|
+
(browsersmith's import-time `createSocket("udp4")` singleton,
|
|
116
120
|
replaceability audit, 2026-11-16). A factory binds sockets at connection
|
|
117
121
|
time, per connection, and lets UDP-less runtimes (Cloudflare Workers) omit
|
|
118
122
|
the capability instead of dead-binding a socket.
|
|
119
123
|
|
|
120
124
|
**`Clock` is THE time contract.** `now()` (wall, epoch ms),
|
|
121
|
-
`monotonic()` (monotonic ms
|
|
125
|
+
`monotonic()` (monotonic ms; never `Date.now()` deltas for deadline math),
|
|
122
126
|
`sleep(ms)`, `setTimeout(ms, fn)` / `clearTimeout(handle)` with
|
|
123
|
-
`TimerHandle` an opaque `object` (not `NodeJS.Timeout
|
|
127
|
+
`TimerHandle` an opaque `object` (not `NodeJS.Timeout`; runtime timer
|
|
124
128
|
tokens must not leak into published declarations). It supersedes the five
|
|
125
129
|
package-local sibling Clock shapes (tls/http1/http2/http3/quic), whose
|
|
126
130
|
`options.clock` seams migrate onto it in the next wave. `Time` remains as
|
|
@@ -128,18 +132,51 @@ the `Platform` bundle name aliasing `Clock`; `Duration`/`Scheduler`/
|
|
|
128
132
|
`Deadline` stay for duration-composed scheduling.
|
|
129
133
|
|
|
130
134
|
**`TlsHandshakeEngine` is the quic↔tls seam.** Protocol packages never
|
|
131
|
-
import each other (the no-hard-wires invariant); this interface
|
|
135
|
+
import each other (the no-hard-wires invariant); this interface,
|
|
132
136
|
`runHandshake` / `generateKeyShares` / `cipherSuiteToAead` plus the pure
|
|
133
|
-
handshake data types
|
|
137
|
+
handshake data types, is what `@browsercore/tls` implements and the
|
|
134
138
|
composition root injects into quic, replacing quic's direct tls imports
|
|
135
139
|
(the audit's single no-hard-wires violation). http3's fake-quic
|
|
136
140
|
compatibility test is the proof-of-concept for swapping a structural engine
|
|
137
141
|
implementation.
|
|
138
142
|
|
|
143
|
+
**`Certificate.signatureAlgorithm` is a discriminated union (0.2.8,
|
|
144
|
+
breaking).** The engine's certificate mirror previously carried
|
|
145
|
+
`signatureScheme: SignatureScheme`, and the tls parser threw for every
|
|
146
|
+
signature algorithm outside four hardcoded OIDs — making servers presenting
|
|
147
|
+
SHA-384/512 RSA, ECDSA-SHA512, Ed25519, or RSA-PSS certificates unreachable.
|
|
148
|
+
tls 0.4.19 fixed that by never throwing on a structurally valid certificate:
|
|
149
|
+
parsing always succeeds, and `CertificateSignatureAlgorithm` records the
|
|
150
|
+
outcome — `{ kind: "supported", scheme }` when the OID maps to a scheme the
|
|
151
|
+
engine can verify, or `{ kind: "rejected", reason: "sha1" | "md5" |
|
|
152
|
+
"pss-parameters" | "unknown", oid }` naming the policy reason and the
|
|
153
|
+
dotted-arc OID when policy declines it. Acceptance is the ENGINE's decision,
|
|
154
|
+
not the parser's — matching Chrome, which parses SHA-1-signed roots but
|
|
155
|
+
refuses to rely on them. The mirror also gained `Certificate.selfSigned`
|
|
156
|
+
(true when the subject DN bytes equal the issuer DN bytes). This is a
|
|
157
|
+
breaking type change for consumers reading `peerCertificate.signatureScheme`:
|
|
158
|
+
migrate by switching on `peerCertificate.signatureAlgorithm.kind` —
|
|
159
|
+
`"supported"` reads `.scheme` where `signatureScheme` used to be read;
|
|
160
|
+
`"rejected"` surfaces `.reason`/`.oid` instead of a thrown error:
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import type { Certificate } from "@browsercore/contracts";
|
|
164
|
+
|
|
165
|
+
/** `kind` narrows the union; the exhaustive switch needs no default arm. */
|
|
166
|
+
function describeIssuerSignature(certificate: Certificate): string {
|
|
167
|
+
switch (certificate.signatureAlgorithm.kind) {
|
|
168
|
+
case "supported":
|
|
169
|
+
return `signed with ${certificate.signatureAlgorithm.scheme}`;
|
|
170
|
+
case "rejected":
|
|
171
|
+
return `refusing ${certificate.signatureAlgorithm.reason} (${certificate.signatureAlgorithm.oid})`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
139
176
|
**Canonical config homes.** `ProxyConfig`/`ProxyScheme`/`ProxyTarget`/
|
|
140
177
|
`ProxyCredentials` (verbatim from `@browsercore/proxy`), `ProfileId` (the
|
|
141
178
|
ten built-in registry ids), and `CookieJarConsumer` (the minimal jar surface
|
|
142
|
-
fetch actually calls
|
|
179
|
+
fetch actually calls; `@browsercore/cookies`' full jar satisfies it
|
|
143
180
|
structurally) are defined here as canonical; the owning packages alias onto
|
|
144
181
|
them in the next wave.
|
|
145
182
|
|
|
@@ -156,7 +193,7 @@ future would cost) lives in
|
|
|
156
193
|
import type { Net, DnsResolver, Transport, BrowserProfile } from "@browsercore/contracts";
|
|
157
194
|
```
|
|
158
195
|
|
|
159
|
-
Type imports are erased at compile time
|
|
196
|
+
Type imports are erased at compile time, zero runtime cost.
|
|
160
197
|
|
|
161
198
|
### Importing wire code tables (runtime)
|
|
162
199
|
|
|
@@ -173,7 +210,7 @@ const x25519 = NAMED_GROUP_CODES["x25519"]; // 0x001d
|
|
|
173
210
|
import type { Transport, TransportState, CloseReason } from "@browsercore/contracts";
|
|
174
211
|
|
|
175
212
|
class MyCustomTransport implements Transport {
|
|
176
|
-
// Implement the interface
|
|
213
|
+
// Implement the interface and the rest of the stack works unchanged
|
|
177
214
|
}
|
|
178
215
|
```
|
|
179
216
|
|
|
@@ -192,19 +229,19 @@ class MyCustomTransport implements Transport {
|
|
|
192
229
|
4. **Branded types live in the implementing packages.** Opaque ID brands
|
|
193
230
|
(`TransportId` in transport, `ConnectionId` in quic, `CryptoSessionId` in
|
|
194
231
|
crypto) are defined per-package and stay assignable to the plain
|
|
195
|
-
`string`/`number` fields here. Contracts itself ships plain aliases
|
|
232
|
+
`string`/`number` fields here. Contracts itself ships plain aliases:
|
|
196
233
|
`ProfileId` is a plain `string`, not a brand.
|
|
197
234
|
|
|
198
235
|
5. **Discriminated unions for state.** `TransportState`, `CloseReason`,
|
|
199
|
-
`TlsState` model every valid state explicitly
|
|
236
|
+
`TlsState` model every valid state explicitly, invalid combinations
|
|
200
237
|
are unrepresentable.
|
|
201
238
|
|
|
202
239
|
## Zero overhead
|
|
203
240
|
|
|
204
241
|
All type exports are erased by the TypeScript compiler. The only runtime
|
|
205
|
-
exports are the IANA wire code tables and `Duration` factories
|
|
242
|
+
exports are the IANA wire code tables and `Duration` factories, plain
|
|
206
243
|
`const` objects with no dependencies, no side effects.
|
|
207
244
|
|
|
208
245
|
## Contributing
|
|
209
246
|
|
|
210
|
-
Contributions are welcome
|
|
247
|
+
Contributions are welcome: bug reports, reproductions, docs and code alike. Start with [CONTRIBUTING.md](CONTRIBUTING.md); the full guide lives in the [browsersmith repo](https://github.com/jverneuer/browsersmith/blob/main/CONTRIBUTING.md). First timer? Check the [`good first issue`](https://github.com/jverneuer/browsercore-contracts/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label. Security issues: [SECURITY.md](SECURITY.md), never a public issue.
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type { CryptoProvider, CompressionProvider, Transport, DatagramTransport,
|
|
|
26
26
|
export type { ProfileId, RegisteredProfileId, BrowserProfile, TlsProfile, Http1Profile, Http2Profile, HpackProfile, Http2PriorityFrame, Request, Response, FetchOptions, FetchResponse, Headers, Cookie, HashId, EcdhCurve, X25519KeyPair, MLKEM768KeyPair, EcdhKeyPair, UdpAddress, TransportState, CloseReason, DatagramCloseReason, TlsState, ContentEncoding, } from "./models.js";
|
|
27
27
|
export { CIPHER_GREASE_PLACEHOLDER, CIPHER_SUITE_CODES, NAMED_GROUP_CODES, SIGNATURE_SCHEME_CODES, VERSION_CODES, } from "./models.js";
|
|
28
28
|
export type { ConnectOptions, Socket, Net, DnsResolver, IPAddress, Network, } from "./tcp-transport.js";
|
|
29
|
-
export type { AeadAlgorithm, CipherSuite, NamedGroup, SignatureScheme, ProtocolVersion, ClientHelloConfig, ServerHello, Certificate, KeyPair, TrafficSecrets, ApplicationTrafficSecrets, HandshakePhase, AlertLevel, TlsHandshakeContext, TlsHandshakeEngine, } from "./tls-engine.js";
|
|
29
|
+
export type { AeadAlgorithm, CipherSuite, NamedGroup, SignatureScheme, CertificateSignatureAlgorithm, ProtocolVersion, ClientHelloConfig, ServerHello, Certificate, KeyPair, TrafficSecrets, ApplicationTrafficSecrets, HandshakePhase, AlertLevel, TlsHandshakeContext, TlsHandshakeEngine, } from "./tls-engine.js";
|
|
30
30
|
export type { ProxyScheme, ProxyConfig, ProxyTarget, ProxyCredentials, CookieJarConsumer, } from "./config.js";
|
|
31
31
|
export type { EventProvider, TypedEventEmitter, } from "./events.js";
|
|
32
32
|
export type { Logger, Span, Tracer, Metrics, Telemetry, } from "./telemetry.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,YAAY,EAER,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAEhB,SAAS,EAET,cAAc,EACd,uBAAuB,GAC1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAER,SAAS,EACT,mBAAmB,EAEnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAElB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,aAAa,EAEb,OAAO,EAEP,MAAM,EAEN,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,QAAQ,EAER,eAAe,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,cAAc,EACd,MAAM,EACN,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,GACV,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAER,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,YAAY,EAER,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAEhB,SAAS,EAET,cAAc,EACd,uBAAuB,GAC1B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAER,SAAS,EACT,mBAAmB,EAEnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAElB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,aAAa,EAEb,OAAO,EAEP,MAAM,EAEN,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,QAAQ,EAER,eAAe,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,cAAc,EACd,MAAM,EACN,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,GACV,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAER,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAGf,6BAA6B,EAC7B,eAAe,EAEf,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,OAAO,EACP,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,iBAAiB,CAAC;AAMzB,YAAY,EACR,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,aAAa,EACb,iBAAiB,GACpB,MAAM,aAAa,CAAC;AAMrB,YAAY,EACR,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,GACZ,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,IAAI,GACP,MAAM,WAAW,CAAC;AAEnB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,YAAY,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,eAAe,GAClB,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4DH,8DAA8D;AAC9D,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4DH,8DAA8D;AAC9D,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,aAAa,CAAC;AAwFrB,uFAAuF;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAarC,8EAA8E;AAC9E,qEAAqE;AACrE,uEAAuE;AACvE,6DAA6D;AAC7D,qCAAqC"}
|
package/dist/tcp-transport.d.ts
CHANGED
|
@@ -78,6 +78,24 @@ export interface DnsResolver {
|
|
|
78
78
|
* @returns Resolved addresses (at least one).
|
|
79
79
|
*/
|
|
80
80
|
lookup(hostname: string, family: 4 | 6): Promise<readonly IPAddress[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Resolve a hostname to EVERY address the resolver returns, both address
|
|
83
|
+
* families, in the resolver's own order — one system lookup where the
|
|
84
|
+
* platform performs one (e.g. Node's `dns.lookup` with `all: true` issues
|
|
85
|
+
* a single `getaddrinfo` call covering A and AAAA).
|
|
86
|
+
*
|
|
87
|
+
* Optional so existing implementations stay valid: resolvers that cannot
|
|
88
|
+
* enumerate both families in one call (per-family shims, the Workers
|
|
89
|
+
* edge passthrough) simply omit it, and callers fall back to pairing
|
|
90
|
+
* {@link lookup} calls. Implementers who CAN perform a single dual-family
|
|
91
|
+
* lookup should provide it — it lets transports resolve once, with the
|
|
92
|
+
* platform's native ordering, instead of issuing two family-specific
|
|
93
|
+
* lookups and stitching the results.
|
|
94
|
+
*
|
|
95
|
+
* @param hostname - DNS name to resolve.
|
|
96
|
+
* @returns Every resolved address, both families, resolver's own order.
|
|
97
|
+
*/
|
|
98
|
+
lookupAll?(hostname: string): Promise<readonly IPAddress[]>;
|
|
81
99
|
}
|
|
82
100
|
/**
|
|
83
101
|
* `Network` — the injected network bundle (part of `Platform`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tcp-transport.d.ts","sourceRoot":"","sources":["../src/tcp-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAMvD,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,MAAM;IACnB;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC;IACpE,yCAAyC;IACzC,GAAG,IAAI,IAAI,CAAC;IACZ,gEAAgE;IAChE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,oCAAoC;IACpC,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAC3D,sCAAsC;IACtC,EAAE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AAkC;AAClC,MAAM,WAAW,GAAG;IAChB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC;CAC5C;AAMD,6BAA6B;AAC7B,MAAM,WAAW,SAAS;IACtB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC1B;AAED,kCAAkC;AAClC,MAAM,WAAW,WAAW;IACxB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;IACvE;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;CAC/D;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,OAAO;IACpB,mFAAmF;IACnF,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;IACnB,mGAAmG;IACnG,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC;CACnC"}
|
package/dist/tls-engine.d.ts
CHANGED
|
@@ -26,7 +26,12 @@
|
|
|
26
26
|
* `cipherSuiteToAead` and the types `AeadAlgorithm`, `CipherSuite`,
|
|
27
27
|
* `ClientHelloConfig`, `ServerHello`, `Certificate`, `TrafficSecrets`,
|
|
28
28
|
* `HandshakeContext`, `HandshakePhase`, `AlertLevel`; `KeyPair` and
|
|
29
|
-
* `ApplicationTrafficSecrets` ride along as the callback/return data
|
|
29
|
+
* `ApplicationTrafficSecrets` ride along as the callback/return data;
|
|
30
|
+
* `CertificateSignatureAlgorithm` (0.2.8) rides along inside `Certificate`
|
|
31
|
+
* — this file is its canonical home (code-standards §22): tls 0.4.19
|
|
32
|
+
* imports and re-exports this type from `@browsercore/contracts`; earlier
|
|
33
|
+
* tls versions declared a structurally identical local union. It lives here
|
|
34
|
+
* because it sits on the `Certificate` shape quic receives).
|
|
30
35
|
* Division of labor: quic implements the context itself (its
|
|
31
36
|
* `QuicHandshakeContext` — the consumer-side SPI), so
|
|
32
37
|
* {@link TlsHandshakeContext} here describes only the structural data
|
|
@@ -55,6 +60,37 @@ export type CipherSuite = "TLS_GREASE_RESERVED_0" | "TLS_AES_128_GCM_SHA256" | "
|
|
|
55
60
|
export type NamedGroup = "secp256r1" | "secp384r1" | "secp521r1" | "x25519" | "x448" | "ffdhe2048" | "ffdhe3072" | "X25519MLKEM768" | "X25519Kyber768";
|
|
56
61
|
/** Signature algorithms accepted in CertificateVerify (IANA canonical names). */
|
|
57
62
|
export type SignatureScheme = "ecdsa_secp256r1_sha256" | "ecdsa_secp384r1_sha384" | "ecdsa_secp521r1_sha512" | "ecdsa_sha1" | "ed25519" | "rsa_pss_rsae_sha256" | "rsa_pss_rsae_sha384" | "rsa_pss_rsae_sha512" | "rsa_pkcs1_sha256" | "rsa_pkcs1_sha384" | "rsa_pkcs1_sha512" | "rsa_pkcs1_sha1";
|
|
63
|
+
/**
|
|
64
|
+
* The signature algorithm carried on a parsed certificate, as a
|
|
65
|
+
* discriminated union. Canonical here since 0.2.8: `@browsercore/tls` 0.4.19
|
|
66
|
+
* imports and re-exports this type from `@browsercore/contracts` (earlier
|
|
67
|
+
* tls versions declared a structurally identical local union).
|
|
68
|
+
*
|
|
69
|
+
* Why a union instead of a plain scheme name: certificate parsing used to
|
|
70
|
+
* THROW for every signature algorithm outside a handful of hardcoded OIDs,
|
|
71
|
+
* which made servers presenting SHA-384/512 RSA, ECDSA-SHA512, Ed25519 or
|
|
72
|
+
* RSA-PSS certificates unreachable. Now parsing succeeds for EVERY
|
|
73
|
+
* structurally valid certificate; whether a given signature algorithm is
|
|
74
|
+
* ACCEPTED is the engine's policy decision, not the parser's — matching
|
|
75
|
+
* Chrome, which parses SHA-1-signed roots but refuses to rely on them.
|
|
76
|
+
*
|
|
77
|
+
* - `supported`: the OID mapped to a {@link SignatureScheme} the engine
|
|
78
|
+
* knows how to verify.
|
|
79
|
+
* - `rejected`: the OID parsed but policy declines it; `reason` names why
|
|
80
|
+
* (`sha1` / `md5` — cryptographically broken, `pss-parameters` —
|
|
81
|
+
* RSA-PSS with parameters the engine does not accept, `unknown` — no
|
|
82
|
+
* mapping for the OID) and `oid` carries the dotted-arc algorithm OID for
|
|
83
|
+
* diagnostics and telemetry.
|
|
84
|
+
*/
|
|
85
|
+
export type CertificateSignatureAlgorithm = {
|
|
86
|
+
readonly kind: "supported";
|
|
87
|
+
readonly scheme: SignatureScheme;
|
|
88
|
+
} | {
|
|
89
|
+
readonly kind: "rejected";
|
|
90
|
+
readonly reason: "sha1" | "md5" | "pss-parameters" | "unknown";
|
|
91
|
+
/** Dotted-arc OID of the signature algorithm that was rejected. */
|
|
92
|
+
readonly oid: string;
|
|
93
|
+
};
|
|
58
94
|
/**
|
|
59
95
|
* A TLS protocol version — name plus IANA wire code as a discriminated pair
|
|
60
96
|
* (the wire code is what the supported_versions extension carries).
|
|
@@ -160,14 +196,26 @@ export interface Certificate {
|
|
|
160
196
|
readonly keyUsageDigitalSignature: boolean;
|
|
161
197
|
/** True if the certificate has the keyUsage bit for key encipherment/agreement. */
|
|
162
198
|
readonly keyUsageKeyEncipherment: boolean;
|
|
163
|
-
/**
|
|
164
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Signature algorithm used by the issuer over the TBSCertificate.
|
|
201
|
+
* Parsing never throws on an unrecognized algorithm — `rejected` names
|
|
202
|
+
* the policy reason and acceptance is the engine's decision (see
|
|
203
|
+
* {@link CertificateSignatureAlgorithm}). Replaces the former
|
|
204
|
+
* `signatureScheme: SignatureScheme` field (0.2.8, breaking).
|
|
205
|
+
*/
|
|
206
|
+
readonly signatureAlgorithm: CertificateSignatureAlgorithm;
|
|
165
207
|
/** Raw signature value from the issuer. */
|
|
166
208
|
readonly signatureValue: Uint8Array;
|
|
167
209
|
/** DER-encoded SubjectPublicKeyInfo of the issuer (for chain building). */
|
|
168
210
|
readonly issuer: string;
|
|
169
211
|
/** True for a CA certificate. */
|
|
170
212
|
readonly isCa: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* True when the subject DN bytes equal the issuer DN bytes — a
|
|
215
|
+
* self-issued certificate whose trust rests on being a local trust
|
|
216
|
+
* anchor rather than a chain.
|
|
217
|
+
*/
|
|
218
|
+
readonly selfSigned: boolean;
|
|
171
219
|
}
|
|
172
220
|
/**
|
|
173
221
|
* A key share for one named group — the data `generateKeyShares` returns.
|
package/dist/tls-engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tls-engine.d.ts","sourceRoot":"","sources":["../src/tls-engine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tls-engine.d.ts","sourceRoot":"","sources":["../src/tls-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAY1C,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GACnB,aAAa,GACb,aAAa,GACb,aAAa,GACb,mBAAmB,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GACjB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,8BAA8B,GAC9B,wBAAwB,GACxB,yCAAyC,GACzC,uCAAuC,GACvC,yCAAyC,GACzC,uCAAuC,GACvC,+CAA+C,GAC/C,6CAA6C,GAC7C,oCAAoC,GACpC,oCAAoC,GACpC,sCAAsC,GACtC,sCAAsC,GACtC,yCAAyC,GACzC,yCAAyC,GACzC,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;IAClE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC1C,8EAA8E;IAC9E,YAAY,EAAE,cAAc,CAAC;IAC7B,sFAAsF;IACtF,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAMD;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CACR,GAAG,EAAE,mBAAmB,EACxB,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,SAAS,UAAU,EAAE,EACnC,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,EACpE,GAAG,EAAE,MAAM,GACZ,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEtC;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEzF,qFAAqF;IACrF,iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,CAAC;CAC9D"}
|
package/dist/tls-engine.js
CHANGED
|
@@ -26,7 +26,12 @@
|
|
|
26
26
|
* `cipherSuiteToAead` and the types `AeadAlgorithm`, `CipherSuite`,
|
|
27
27
|
* `ClientHelloConfig`, `ServerHello`, `Certificate`, `TrafficSecrets`,
|
|
28
28
|
* `HandshakeContext`, `HandshakePhase`, `AlertLevel`; `KeyPair` and
|
|
29
|
-
* `ApplicationTrafficSecrets` ride along as the callback/return data
|
|
29
|
+
* `ApplicationTrafficSecrets` ride along as the callback/return data;
|
|
30
|
+
* `CertificateSignatureAlgorithm` (0.2.8) rides along inside `Certificate`
|
|
31
|
+
* — this file is its canonical home (code-standards §22): tls 0.4.19
|
|
32
|
+
* imports and re-exports this type from `@browsercore/contracts`; earlier
|
|
33
|
+
* tls versions declared a structurally identical local union. It lives here
|
|
34
|
+
* because it sits on the `Certificate` shape quic receives).
|
|
30
35
|
* Division of labor: quic implements the context itself (its
|
|
31
36
|
* `QuicHandshakeContext` — the consumer-side SPI), so
|
|
32
37
|
* {@link TlsHandshakeContext} here describes only the structural data
|
package/dist/tls-engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tls-engine.js","sourceRoot":"","sources":["../src/tls-engine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tls-engine.js","sourceRoot":"","sources":["../src/tls-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG"}
|