Commit 63c72d3
committed
crypto/openssl-wrapper: fix SSL error code mapping
Map mbedtls error codes to OpenSSL standard return codes in
SSL_connect/SSL_do_handshake:
- Return 1 on success
- Return 0 on controlled shutdown
- Return -1 on fatal error (was returning mbedtls error codes)
This aligns the return values with OpenSSL specification where
SSL_get_error() should be called to get the actual error reason.
Signed-off-by: makejian <makejian@xiaomi.com>1 parent 9c43ced commit 63c72d3
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
372 | 373 | | |
373 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
377 | 380 | | |
378 | | - | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | | - | |
| 385 | + | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
| |||
397 | 401 | | |
398 | 402 | | |
399 | 403 | | |
400 | | - | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
0 commit comments