Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
Commit21958e4
committed
tls,http2: send fatal alert on ALPN mismatch
To comply with RFC 7301, make TLS servers send a fatal alert during theTLS handshake if both the client and the server are configured to useALPN and if the server does not support any of the protocols advertisedby the client.This affects HTTP/2 servers. Until now, applications could intercept the'unknownProtocol' event when the client either did not advertise anyprotocols or if the list of protocols advertised by the client did notinclude HTTP/2 (or HTTP/1.1 if allowHTTP1 was true). With this change,only the first case can be handled, and the 'unknownProtocol' event willnot be emitted in the second case because the TLS handshake fails and nosecure connection is established.1 parent0616eaf commit21958e4
File tree
7 files changed
+107
-19
lines changed- doc/api
- lib/internal/http2
- src/crypto
- test/parallel
7 files changed
+107
-19
lines changedLines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2275 | 2275 |
| |
2276 | 2276 |
| |
2277 | 2277 |
| |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
2278 | 2283 |
| |
2279 | 2284 |
| |
2280 | 2285 |
| |
| |||
2284 | 2289 |
| |
2285 | 2290 |
| |
2286 | 2291 |
| |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
2287 | 2301 |
| |
2288 | 2302 |
| |
2289 | 2303 |
| |
|
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
683 | 683 |
| |
684 | 684 |
| |
685 | 685 |
| |
686 |
| - | |
687 |
| - | |
| 686 | + | |
| 687 | + | |
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
| |||
2012 | 2012 |
| |
2013 | 2013 |
| |
2014 | 2014 |
| |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2015 | 2020 |
| |
2016 | 2021 |
| |
2017 | 2022 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3055 | 3055 |
| |
3056 | 3056 |
| |
3057 | 3057 |
| |
3058 |
| - | |
| 3058 | + | |
3059 | 3059 |
| |
3060 | 3060 |
| |
3061 | 3061 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
|
Lines changed: 13 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
| 129 | + | |
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
153 | 152 |
| |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
154 | 164 |
| |
155 | 165 |
| |
156 | 166 |
| |
157 |
| - | |
| 167 | + | |
158 | 168 |
| |
159 | 169 |
| |
160 | 170 |
| |
|
Lines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| |||
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
21 |
| - | |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
25 |
| - | |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 |
| |
29 | 33 |
| |
30 | 34 |
| |
31 |
| - | |
32 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
33 | 47 |
|
Lines changed: 48 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
| |||
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
71 |
| - | |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| |||
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
85 |
| - | |
86 |
| - | |
| 86 | + | |
| 87 | + | |
87 | 88 |
| |
88 | 89 |
| |
89 | 90 |
| |
| |||
161 | 162 |
| |
162 | 163 |
| |
163 | 164 |
| |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
164 | 209 |
| |
165 | 210 |
| |
166 | 211 |
|
0 commit comments
Comments
(0)