diff options
author | David Benjamin <davidben@google.com> | 2024-11-25 17:01:17 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-11-27 13:02:56 +0100 |
commit | 847a23757f7cbebaa882e15087efb926113a0670 (patch) | |
tree | 3f42046575c1bca2431c00ef86d75a165670f45b /doc/man3/SSL_set_bio.pod | |
parent | Upgrade action/{upload,download}-artifact to v4 (diff) | |
download | openssl-847a23757f7cbebaa882e15087efb926113a0670.tar.xz openssl-847a23757f7cbebaa882e15087efb926113a0670.zip |
Document expected BIO operations for libssl
If your custom BIO does not implement BIO_CTRL_FLUSH, it won't work, but
this is not document anywhere.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26060)
Diffstat (limited to '')
-rw-r--r-- | doc/man3/SSL_set_bio.pod | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/man3/SSL_set_bio.pod b/doc/man3/SSL_set_bio.pod index 5cb2a9a427..07f46ab4d7 100644 --- a/doc/man3/SSL_set_bio.pod +++ b/doc/man3/SSL_set_bio.pod @@ -23,6 +23,9 @@ function, any existing B<rbio> that was previously set will also be freed via a call to L<BIO_free_all(3)> (this includes the case where the B<rbio> is set to the same value as previously). +If using a custom BIO, B<rbio> must implement either +L<BIO_meth_set_read_ex(3)> or L<BIO_meth_set_read(3)>. + SSL_set0_wbio() works in the same as SSL_set0_rbio() except that it connects the BIO B<wbio> for the write operations of the B<ssl> object. Note that if the rbio and wbio are the same then SSL_set0_rbio() and SSL_set0_wbio() each take @@ -30,6 +33,12 @@ ownership of one reference. Therefore, it may be necessary to increment the number of references available using L<BIO_up_ref(3)> before calling the set0 functions. +If using a custom BIO, B<wbio> must implement +L<BIO_meth_set_write_ex(3)> or L<BIO_meth_set_write(3)>. It additionally must +implement L<BIO_flush(3)> using B<BIO_CTRL_FLUSH> and L<BIO_meth_set_ctrl(3)>. +If flushing is unnecessary with B<wbio>, L<BIO_flush(3)> should return one and +do nothing. + SSL_set_bio() is similar to SSL_set0_rbio() and SSL_set0_wbio() except that it connects both the B<rbio> and the B<wbio> at the same time, and transfers the ownership of B<rbio> and B<wbio> to B<ssl> according to |