wolfssl
wolfssl copied to clipboard
Add BIO_sock_should_retry and BIO_sock_non_fatal_error to OpenSSL compatibility layer
Description
BIO_sock_should_retry and BIO_sock_non_fatal_error are not currently implemented inside the OpenSSL compatibility layer.
BIO_sock_should_retry is used to check whether the last socket operation has resulted in a fatal error or not, and if a retry (as such) is advised or not.
To make it possible to implement BIO_sock_should_retry without code reuse, I've taken the liberty of making wolfSSL_LastError a public function, available in the wolfio.h header. Thanks to this change, examples/server/server.c no longer needs its own definition of wolfSSL_LastError either.
Testing
I've created a new test case, based on the BIO_should_retry test case. It completes successfully. The application I'm porting to WolfSSL also works fine with the change.
Checklist
- [X] added tests
- [ ] updated/added doxygen
- [ ] updated appropriate READMEs
- [ ] Updated manual and documentation
Can one of the wolfSSL admins verify this patch?
OK to test
Approved as contributor.
@darktohka ./configure --enable-all && make check is failing the scripts/unit.test.
Can one of the admins verify this patch?