From b76794fba312923f8e22b518510bbef1b884e098 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 23 Dec 2022 17:52:32 +0000 Subject: [PATCH] Document the deprecated wrappers BIO_set_app_data(3) and BIO_get_app_data(3). Some code roams the wild still calling them. --- lib/libcrypto/man/BIO_get_ex_new_index.3 | 41 +++++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/man/BIO_get_ex_new_index.3 b/lib/libcrypto/man/BIO_get_ex_new_index.3 index a0bed0ea1d9..fd584f6b545 100644 --- a/lib/libcrypto/man/BIO_get_ex_new_index.3 +++ b/lib/libcrypto/man/BIO_get_ex_new_index.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.12 2019/08/16 12:16:22 schwarze Exp $ +.\" $OpenBSD: BIO_get_ex_new_index.3,v 1.13 2022/12/23 17:52:32 schwarze Exp $ .\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 .\" .\" This file was written by Rich Salz . @@ -48,13 +48,15 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: August 16 2019 $ +.Dd $Mdocdate: December 23 2022 $ .Dt BIO_GET_EX_NEW_INDEX 3 .Os .Sh NAME .Nm BIO_get_ex_new_index , .Nm BIO_set_ex_data , .Nm BIO_get_ex_data , +.Nm BIO_set_app_data , +.Nm BIO_get_app_data , .Nm ENGINE_get_ex_new_index , .Nm ENGINE_set_ex_data , .Nm ENGINE_get_ex_data , @@ -101,6 +103,15 @@ .Fa "TYPE *d" .Fa "int idx" .Fc +.Ft int +.Fo TYPE_set_app_data +.Fa "TYPE *d" +.Fa "void *arg" +.Fc +.Ft void * +.Fo TYPE_get_app_data +.Fa "TYPE *d" +.Fc .Sh DESCRIPTION In the description here, .Vt TYPE @@ -133,15 +144,30 @@ is a function that calls with an offset into the opaque exdata part of the .Vt TYPE object. +.Pp +.Fn TYPE_set_app_data +and +.Fn TYPE_get_app_data +are deprecated wrappers that call +.Fn TYPE_set_ex_data +and +.Fn TYPE_get_ex_data +with +.Fa idx +set to 0. .Sh RETURN VALUES .Fn TYPE_get_new_ex_index returns a new index on success or \-1 on error. .Pp .Fn TYPE_set_ex_data -returns 1 on success or 0 on error. +and +.Fn TYPE_set_app_data +return 1 on success or 0 on error. .Pp .Fn TYPE_get_ex_data -returns the application data or +and +.Fn TYPE_get_app_data +return the application data or .Dv NULL if an error occurred. .Sh SEE ALSO @@ -150,11 +176,16 @@ if an error occurred. .Xr RSA_get_ex_new_index 3 , .Xr X509_new 3 .Sh HISTORY +.Fn BIO_set_app_data +and +.Fn BIO_get_app_data +first appeared in SSLeay 0.8.1. .Fn BIO_get_ex_new_index , .Fn BIO_set_ex_data , and .Fn BIO_get_ex_data -first appeared in SSLeay 0.9.0 and have been available since +first appeared in SSLeay 0.9.0. +These functions have been available since .Ox 2.4 . .Pp .Fn X509_get_ex_new_index , -- 2.20.1