Commit 78fd5d7
committed
Fix wolfSSL_set_SSL_CTX() to be usable during handshake.
This method requires some explanation. Its sibling is
int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
which re-inits the WOLFSSL* with all settings in the new CTX.
That one is the right one to use *before* a handshake is started.
This method was added by OpenSSL to be used *during* the handshake, e.g.
when a server inspects the SNI in a ClientHello callback and
decides which set of certificates to use.
Since, at the time the SNI callback is run, some decisions on
Extensions or the ServerHello might already have been taken, this
method is very restricted in what it does:
- changing the server certificate(s)
- changing the server id for session handling
and everything else in WOLFSSL* needs to remain untouched.1 parent a3f3c76 commit 78fd5d7
2 files changed
Lines changed: 154 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31987 | 31987 | | |
31988 | 31988 | | |
31989 | 31989 | | |
31990 | | - | |
| 31990 | + | |
| 31991 | + | |
| 31992 | + | |
| 31993 | + | |
| 31994 | + | |
| 31995 | + | |
| 31996 | + | |
| 31997 | + | |
| 31998 | + | |
| 31999 | + | |
| 32000 | + | |
| 32001 | + | |
| 32002 | + | |
| 32003 | + | |
| 32004 | + | |
| 32005 | + | |
| 32006 | + | |
| 32007 | + | |
| 32008 | + | |
| 32009 | + | |
31991 | 32010 | | |
31992 | | - | |
| 32011 | + | |
| 32012 | + | |
| 32013 | + | |
| 32014 | + | |
| 32015 | + | |
| 32016 | + | |
| 32017 | + | |
| 32018 | + | |
| 32019 | + | |
| 32020 | + | |
| 32021 | + | |
| 32022 | + | |
| 32023 | + | |
| 32024 | + | |
| 32025 | + | |
| 32026 | + | |
| 32027 | + | |
| 32028 | + | |
| 32029 | + | |
| 32030 | + | |
| 32031 | + | |
| 32032 | + | |
| 32033 | + | |
| 32034 | + | |
| 32035 | + | |
| 32036 | + | |
| 32037 | + | |
| 32038 | + | |
| 32039 | + | |
| 32040 | + | |
| 32041 | + | |
| 32042 | + | |
| 32043 | + | |
| 32044 | + | |
| 32045 | + | |
| 32046 | + | |
| 32047 | + | |
| 32048 | + | |
| 32049 | + | |
| 32050 | + | |
| 32051 | + | |
31993 | 32052 | | |
31994 | 32053 | | |
31995 | 32054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57299 | 57299 | | |
57300 | 57300 | | |
57301 | 57301 | | |
| 57302 | + | |
| 57303 | + | |
| 57304 | + | |
| 57305 | + | |
| 57306 | + | |
| 57307 | + | |
| 57308 | + | |
| 57309 | + | |
| 57310 | + | |
| 57311 | + | |
| 57312 | + | |
| 57313 | + | |
| 57314 | + | |
| 57315 | + | |
| 57316 | + | |
| 57317 | + | |
| 57318 | + | |
| 57319 | + | |
| 57320 | + | |
| 57321 | + | |
| 57322 | + | |
| 57323 | + | |
| 57324 | + | |
| 57325 | + | |
| 57326 | + | |
| 57327 | + | |
| 57328 | + | |
| 57329 | + | |
| 57330 | + | |
| 57331 | + | |
| 57332 | + | |
| 57333 | + | |
| 57334 | + | |
| 57335 | + | |
| 57336 | + | |
| 57337 | + | |
| 57338 | + | |
| 57339 | + | |
| 57340 | + | |
| 57341 | + | |
| 57342 | + | |
| 57343 | + | |
| 57344 | + | |
| 57345 | + | |
| 57346 | + | |
| 57347 | + | |
| 57348 | + | |
| 57349 | + | |
| 57350 | + | |
| 57351 | + | |
| 57352 | + | |
| 57353 | + | |
| 57354 | + | |
| 57355 | + | |
| 57356 | + | |
| 57357 | + | |
| 57358 | + | |
| 57359 | + | |
| 57360 | + | |
| 57361 | + | |
| 57362 | + | |
| 57363 | + | |
| 57364 | + | |
| 57365 | + | |
| 57366 | + | |
| 57367 | + | |
| 57368 | + | |
| 57369 | + | |
| 57370 | + | |
| 57371 | + | |
| 57372 | + | |
| 57373 | + | |
| 57374 | + | |
| 57375 | + | |
| 57376 | + | |
| 57377 | + | |
| 57378 | + | |
| 57379 | + | |
| 57380 | + | |
| 57381 | + | |
| 57382 | + | |
| 57383 | + | |
| 57384 | + | |
| 57385 | + | |
| 57386 | + | |
| 57387 | + | |
| 57388 | + | |
57302 | 57389 | | |
57303 | 57390 | | |
57304 | 57391 | | |
| |||
60062 | 60149 | | |
60063 | 60150 | | |
60064 | 60151 | | |
| 60152 | + | |
| 60153 | + | |
| 60154 | + | |
| 60155 | + | |
| 60156 | + | |
| 60157 | + | |
60065 | 60158 | | |
60066 | 60159 | | |
60067 | 60160 | | |
| |||
0 commit comments