Commit 4b09d0d04e for openssl.org
commit 4b09d0d04e46f05a9847a8f0d5dbf3b7b0b9753a
Author: noctuelles <paul@plouvel.dev>
Date: Mon Jan 19 18:19:08 2026 +0100
BIO_get_data.pod: Warn about use outside of a custom BIO implementation
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
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 aeb6b1c7e9..0d1cb11cce 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<ptr> 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