diff options
author | David Timber <mieabby@gmail.com> | 2021-07-19 16:56:53 +1000 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-07-19 16:56:53 +1000 |
commit | 74b8ff26438732b0ffbe20e128e99ecd92f8137a (patch) | |
tree | 42cc21c5f623bd7c9677d44f6bea0e4af3887d4c /src/mbedtls.h | |
parent | a9dfe7f6055de66742f389d13adbb71101f9c8c0 (diff) |
Fix htbt hang, fix proone-hostinfo crash bug ...
* Fix htbt hang bug - stagnant data in ssl ctx buffer not flushed
* Add pending_f() abstraction for mbedtls_ssl_check_pending()
* Call read_f() when pending_f() returns true
* Add macro functions: prne_is_nberr() and prne_mbedtls_is_nberr()
* read_f() and write_f() will always set errno to EAGAIN in the event
of MBEDTLS_ERR_SSL_WANT_READ and MBEDTLS_ERR_SSL_WANT_WRITE
* proone-hostinfo: fix crash bug when program init is not successful
* launch.json: Ignore SIGPIPE to hostinfod
Diffstat (limited to 'src/mbedtls.h')
-rw-r--r-- | src/mbedtls.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbedtls.h b/src/mbedtls.h index 16777b4..fed6803 100644 --- a/src/mbedtls.h +++ b/src/mbedtls.h @@ -11,6 +11,10 @@ #include <mbedtls/entropy.h> #include <pthsem.h> +#define prne_mbedtls_is_nberr(expr) \ + ((expr) == MBEDTLS_ERR_SSL_WANT_READ || \ + (expr) == MBEDTLS_ERR_SSL_WANT_WRITE) + // Callback that masks `MBEDTLS_X509_BADCERT_EXPIRED` int prne_mbedtls_x509_crt_verify_cb ( |