Skip to content

Commit b296f9e

Browse files
committed
Wire webtransport-hashes concept down to obtain a connection
1 parent 682d514 commit b296f9e

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

fetch.bs

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,8 +2246,11 @@ Unless stated otherwise, it is false.
22462246
<p class=note>This flag is for exclusive use by HTML's render-blocking mechanism. [[!HTML]]
22472247

22482248
<p>A <a for=/>request</a> has an associated <dfn export for=request
2249-
id=concept-request-webtransport-hashes>webtransport-hashes</dfn> (a
2250-
<a for=/>list</a> of [=webtransport-hash=] items). Unless stated otherwise it is « ».
2249+
id=concept-request-webtransport-hash-list>webtransport-hash list</dfn> (a
2250+
<a for=/>webtransport-hash list</a>). Unless stated otherwise it is « ».
2251+
2252+
<p>A <dfn export id=concept-webtransport-hash-list>webtransport-hash list</dfn> is a <a for=/>list</a> of zero or more
2253+
<a for=/>webtransport-hashes</a>. It is initially « ».
22512254

22522255
<p>An <dfn export id=concept-webtransport-hash>webtransport-hash</dfn> is a
22532256
<a for=/>tuple</a> that consists of
@@ -3014,16 +3017,18 @@ steps:
30143017
<p>To <dfn export id=concept-connection-obtain>obtain a connection</dfn>, given a
30153018
<a>network partition key</a> <var>key</var>, <a for=/>URL</a> <var>url</var>, boolean
30163019
<var>credentials</var>, an optional <a>new connection setting</a> <var>new</var> (default
3017-
"<code>no</code>"), and an optional boolean
3018-
<dfn export for="obtain a connection"><var>requireUnreliable</var></dfn> (default false), run these
3020+
"<code>no</code>"), an optional boolean
3021+
<dfn export for="obtain a connection"><var>requireUnreliable</var></dfn> (default false),
3022+
and an optional <a for=/>webtransport-hash list</a> <var>webTransportHashes</var> (default []), run these
30193023
steps:
3020-
<!-- new's "yes-and-dedicated" and requireUnreliable have been added for WebTransport -->
3024+
<!-- new's "yes-and-dedicated", requireUnreliable and webTransportHashes have been added for WebTransport -->
30213025

30223026
<ol>
30233027
<li>
30243028
<p>If <var>new</var> is "<code>no</code>", then:
30253029

30263030
<ol>
3031+
<li><p><a for=/>Assert</a>: <var>webTransportHashes</var> is empty.
30273032
<li><p>Let <var>connections</var> be a set of <a>connections</a> in the user agent's
30283033
<a>connection pool</a> whose <a for=connection>key</a> is <var>key</var>,
30293034
<a for=connection>origin</a> is <var>url</var>'s <a for=url>origin</a>, and
@@ -3071,7 +3076,8 @@ steps:
30713076
<p>Let <var>connection</var> be the result of running this step: run <a>create a connection</a>
30723077
given <var>key</var>, <var>url</var>'s <a for=url>origin</a>, <var>credentials</var>,
30733078
<var>proxy</var>, an <a>implementation-defined</a> <a for=/>host</a> from <var>hosts</var>,
3074-
<var>timingInfo</var>, and <var>requireUnreliable</var> an <a>implementation-defined</a> number
3079+
<var>timingInfo</var>, <var>requireUnreliable</var> and <var>webTransportHashes</var>
3080+
an <a>implementation-defined</a> number
30753081
of times, <a>in parallel</a> from each other, and wait for at least 1 to return a value. In an
30763082
<a>implementation-defined</a> manner, select a value to return from the returned values and
30773083
return it. Any other returned values that are <a>connections</a> may be closed.
@@ -3105,8 +3111,9 @@ reused across <a>connections</a> whose <a for=connection>credentials</a> are fal
31053111
<div algorithm>
31063112
<p>To <dfn>create a connection</dfn>, given a <a for=/>network partition key</a> <var>key</var>,
31073113
<a for=/>origin</a> <var>origin</var>, boolean <var>credentials</var>, string <var>proxy</var>,
3108-
<a for=/>host</a> <var>host</var>, <a for=/>connection timing info</a> <var>timingInfo</var>, and
3109-
boolean <var>requireUnreliable</var>, run these steps:
3114+
<a for=/>host</a> <var>host</var>, <a for=/>connection timing info</a> <var>timingInfo</var>,
3115+
boolean <var>requireUnreliable</var> and a <a for=/>webtransport-hash list</a>
3116+
<var>webTransportHashes</var>, run these steps:
31103117

31113118
<ol>
31123119
<li><p>Set <var>timingInfo</var>'s <a for="connection timing info">connection start time</a> to the
@@ -3133,6 +3140,12 @@ boolean <var>requireUnreliable</var>, run these steps:
31333140

31343141
<li><p>If <var>credentials</var> is false, then do not send a TLS client certificate.
31353142

3143+
<li><p>If <var>webTransportHashes</var> [=set/is empty|is not empty=], instead of using the
3144+
default certificate verification algorithm, consider the server certificate valid if it
3145+
meets the [=custom certificate requirements=] and if
3146+
[=verify a certificate hash|verifying the certificate hash=] against |webTransportHashes|
3147+
returns true. If either condition is not met, then return failure.
3148+
31363149
<li><p>If establishing a connection does not succeed (e.g., a UDP, TCP, or TLS error), then
31373150
return failure.
31383151
</ul>

0 commit comments

Comments
 (0)