From: noctuelles Date: Mon, 19 Jan 2026 17:19:08 +0000 (+0100) Subject: BIO_get_data.pod: Warn about use outside of a custom BIO implementation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b09d0d04e46f05a9847a8f0d5dbf3b7b0b9753a;p=thirdparty%2Fopenssl.git BIO_get_data.pod: Warn about use outside of a custom BIO implementation Reviewed-by: Matt Caswell Reviewed-by: Paul Dale MergeDate: Tue Feb 3 08:47:06 2026 (Merged from https://github.com/openssl/openssl/pull/29675) --- diff --git a/doc/man3/BIO_get_data.pod b/doc/man3/BIO_get_data.pod index aeb6b1c7e9b..0d1cb11cce4 100644 --- a/doc/man3/BIO_get_data.pod +++ b/doc/man3/BIO_get_data.pod @@ -18,7 +18,7 @@ BIO_get_shutdown - functions for managing BIO state information =head1 DESCRIPTION -These functions are mainly useful when implementing a custom BIO. +These functions can be used when implementing a custom BIO. The BIO_set_data() function associates the custom data pointed to by B with the BIO. This data can subsequently be retrieved via a call to BIO_get_data(). @@ -36,6 +36,13 @@ The BIO_set_shutdown() and BIO_get_shutdown() functions set and get the state of this BIO's shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource is also closed when the BIO is freed. +=head1 WARNINGS + +Do not use BIO_set_data(), BIO_get_data(), BIO_set_init(), BIO_get_init(), outside +the implementation of a custom BIO. +Calling BIO_set_data() on an existing BIO implementation with data that it does +not expect will lead to unexpected results. + =head1 RETURN VALUES BIO_get_data() returns a pointer to the implementation specific custom data