Commit 72ed233
authored
* Change NPN detection:
Version breakdown, support disabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined ->
False/False
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will be defined -> True/False
Version breakdown support enabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
* Refine NPN guard:
- If NPN is disabled, but ALPN is available we need our callback
- Make clinic's ssl behave the same way
This created a working ssl module for me, with NPN disabled and ALPN
enabled for OpenSSL 1.1.0f.
Concerns to address:
The initial commit for NPN support into OpenSSL [1], had the
OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG
guard. The question is if that ever made it into a release.
This would need an ugly hack, something like:
GH-if defined(OPENSSL_NO_NEXTPROTONEG) && \
!defined(OPENSSL_NPN_NEGOTIATED)
GH- define OPENSSL_NPN_UNSUPPORTED 0
GH- define OPENSSL_NPN_NEGOTIATED 1
GH- define OPENSSL_NPN_NO_OVERLAP 2
GH-endif
[1] openssl/openssl@68b33cc5c7.
(cherry picked from commit b2d096b)
1 parent 986b7ff commit 72ed233
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
1502 | 1502 | | |
1503 | 1503 | | |
1504 | 1504 | | |
1505 | | - | |
| 1505 | + | |
1506 | 1506 | | |
1507 | 1507 | | |
1508 | 1508 | | |
| |||
2140 | 2140 | | |
2141 | 2141 | | |
2142 | 2142 | | |
2143 | | - | |
| 2143 | + | |
2144 | 2144 | | |
2145 | 2145 | | |
2146 | 2146 | | |
| |||
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
2221 | | - | |
| 2221 | + | |
2222 | 2222 | | |
2223 | 2223 | | |
2224 | 2224 | | |
| |||
2248 | 2248 | | |
2249 | 2249 | | |
2250 | 2250 | | |
2251 | | - | |
| 2251 | + | |
2252 | 2252 | | |
2253 | 2253 | | |
2254 | 2254 | | |
| |||
2272 | 2272 | | |
2273 | 2273 | | |
2274 | 2274 | | |
| 2275 | + | |
2275 | 2276 | | |
| 2277 | + | |
2276 | 2278 | | |
2277 | 2279 | | |
2278 | 2280 | | |
| |||
2307 | 2309 | | |
2308 | 2310 | | |
2309 | 2311 | | |
2310 | | - | |
| 2312 | + | |
2311 | 2313 | | |
2312 | 2314 | | |
2313 | 2315 | | |
| |||
4305 | 4307 | | |
4306 | 4308 | | |
4307 | 4309 | | |
4308 | | - | |
| 4310 | + | |
4309 | 4311 | | |
4310 | 4312 | | |
4311 | 4313 | | |
| |||
0 commit comments