-
Notifications
You must be signed in to change notification settings - Fork 918
Description
Version
5.7.6
Description
The OpenSSL extra compatibility API defines
#define BIO_nwrite0 wolfSSL_BIO_nwrite0
However this is not actually implemented, there is only
WOLFSSL_API int wolfSSL_BIO_nwrite(WOLFSSL_BIO *bio, char **buf, int num);
I have so far worked around this with BIO_nwrite(.., .., 0);
However I'm not sure how robust this is. Is it the intended approach? There is also the issue that without BIO_nwrite0, it is not clear to me how to cleanly and reliably know how much capacity the BIO has. Are there any plans to implement this other variant? Do you have any guidelines or recommendations? There is no example code using BIO_nwrite.
For added context, I am trying to avoid copies when using SSL on top of io_uring and I set the BIOs for the sockets as follows:
BIO_new_bio_pair(&internal_bio, internal_bio_sz, &network_bio, network_bio_sz);
SSL_set_bio(ssl, internal_bio, internal_bio);For receiving, I read into the network_bio, then BIO_nwrite to register the write, then SSL_read.