]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
BIO_get_data.pod: Warn about use outside of a custom BIO implementation
authornoctuelles <paul@plouvel.dev>
Mon, 19 Jan 2026 17:19:08 +0000 (18:19 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 3 Feb 2026 08:45:01 +0000 (09:45 +0100)
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)

doc/man3/BIO_get_data.pod

index aeb6b1c7e9bab7e16c149d722dd64b606dc85328..0d1cb11cce49148277e24c30751038fbd6d7da47 100644 (file)
@@ -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