Commit 64e4796
committed
wolfssl/wolfcrypt/wc_port.h: add definition for WOLFSSL_MUTEX_INITIALIZER, currently only #ifdef WOLFSSL_PTHREADS.
src/ssl.c: refactor dynamics of count_mutex, count_mutex_valid, and initRefCount, to be intrinsically race-free on pthreads builds, and to be always race-free for callers that call wolfSSL_Init() first, then wait for return before any other wolfSSL calls, and call wolfSSL_Cleanup() at most as many times as wolfSSL_Init().
also, in AddSessionToClientCache(), move final access to ClientCache inside the lock-protected span, to mollify Coverity.1 parent 16c6bd6 commit 64e4796
2 files changed
+35
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1268 | 1271 | | |
1269 | 1272 | | |
| 1273 | + | |
1270 | 1274 | | |
1271 | 1275 | | |
1272 | 1276 | | |
| |||
6258 | 6262 | | |
6259 | 6263 | | |
6260 | 6264 | | |
| 6265 | + | |
6261 | 6266 | | |
6262 | 6267 | | |
6263 | 6268 | | |
| |||
6267 | 6272 | | |
6268 | 6273 | | |
6269 | 6274 | | |
| 6275 | + | |
6270 | 6276 | | |
6271 | 6277 | | |
6272 | 6278 | | |
| |||
13378 | 13384 | | |
13379 | 13385 | | |
13380 | 13386 | | |
13381 | | - | |
13382 | | - | |
13383 | | - | |
13384 | | - | |
13385 | | - | |
13386 | | - | |
| 13387 | + | |
| 13388 | + | |
| 13389 | + | |
| 13390 | + | |
| 13391 | + | |
| 13392 | + | |
| 13393 | + | |
| 13394 | + | |
13387 | 13395 | | |
| 13396 | + | |
13388 | 13397 | | |
13389 | | - | |
13390 | | - | |
13391 | | - | |
| 13398 | + | |
| 13399 | + | |
| 13400 | + | |
| 13401 | + | |
| 13402 | + | |
13392 | 13403 | | |
| 13404 | + | |
13393 | 13405 | | |
| 13406 | + | |
13394 | 13407 | | |
| 13408 | + | |
13395 | 13409 | | |
| 13410 | + | |
13396 | 13411 | | |
13397 | 13412 | | |
13398 | 13413 | | |
| |||
13442 | 13457 | | |
13443 | 13458 | | |
13444 | 13459 | | |
| 13460 | + | |
13445 | 13461 | | |
13446 | 13462 | | |
13447 | 13463 | | |
13448 | 13464 | | |
13449 | 13465 | | |
| 13466 | + | |
13450 | 13467 | | |
13451 | 13468 | | |
13452 | 13469 | | |
| |||
14339 | 14356 | | |
14340 | 14357 | | |
14341 | 14358 | | |
| 14359 | + | |
| 14360 | + | |
14342 | 14361 | | |
14343 | 14362 | | |
14344 | 14363 | | |
| |||
14392 | 14411 | | |
14393 | 14412 | | |
14394 | 14413 | | |
| 14414 | + | |
| 14415 | + | |
14395 | 14416 | | |
14396 | 14417 | | |
14397 | 14418 | | |
| |||
14402 | 14423 | | |
14403 | 14424 | | |
14404 | 14425 | | |
14405 | | - | |
14406 | | - | |
14407 | | - | |
14408 | | - | |
| 14426 | + | |
| 14427 | + | |
14409 | 14428 | | |
14410 | 14429 | | |
14411 | 14430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
| |||
0 commit comments