From 0f1c0cf1549c9b53d830828030c30cb5ea40d94b Mon Sep 17 00:00:00 2001 From: Vitezslav Cizek Date: Tue, 2 Jan 2018 14:43:18 +0100 Subject: [PATCH] Update the BIO_s_connect documentation after the BIO refactoring. The BIO was refactored in 417be660e1cd21a2ee085569ff98b0c4249b5416, but the manual wasn't fully updated to reflect some of the changes. Reviewed-by: Rich Salz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/5007) --- doc/man3/BIO_s_connect.pod | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/doc/man3/BIO_s_connect.pod b/doc/man3/BIO_s_connect.pod index be2f4e5002..b084e6d226 100644 --- a/doc/man3/BIO_s_connect.pod +++ b/doc/man3/BIO_s_connect.pod @@ -107,10 +107,10 @@ ports. This can be avoided by checking for the presence of the ':' character in the passed hostname and either indicating an error or truncating the string at that point. -The values returned by BIO_get_conn_hostname(), BIO_get_conn_port(), -BIO_get_conn_ip() and BIO_get_conn_int_port() are updated when a -connection attempt is made. Before any connection attempt the values -returned are those set by the application itself. +The values returned by BIO_get_conn_hostname(), BIO_get_conn_address(), +and BIO_get_conn_port() are updated when a connection attempt is made. +Before any connection attempt the values returned are those set by the +application itself. Applications do not have to call BIO_do_connect() but may wish to do so to separate the connection process from other I/O processing. @@ -124,10 +124,9 @@ then this is an indication that a connection attempt would block, the application should then take appropriate action to wait until the underlying socket has connected and retry the call. -BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip(), -BIO_set_conn_int_port(), BIO_get_conn_hostname(), BIO_get_conn_port(), -BIO_get_conn_ip(), BIO_get_conn_int_port(), BIO_set_nbio() and -BIO_do_connect() are macros. +BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_get_conn_hostname(), +BIO_set_conn_address(), BIO_get_conn_port(), BIO_get_conn_address(), +BIO_set_nbio(), and BIO_do_connect() are macros. =head1 RETURN VALUES @@ -136,21 +135,19 @@ BIO_s_connect() returns the connect BIO method. BIO_get_fd() returns the socket or -1 if the BIO has not been initialized. -BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip() and -BIO_set_conn_int_port() always return 1. +BIO_set_conn_address() and BIO_set_conn_port() always return 1. -BIO_get_conn_hostname() returns the connected hostname or NULL is +BIO_set_conn_hostname() returns 1 on success and 0 on failure. + +BIO_get_conn_address() returns the address information or NULL if none +was set. + +BIO_get_conn_hostname() returns the connected hostname or NULL if none was set. BIO_get_conn_port() returns a string representing the connected port or NULL if not set. -BIO_get_conn_ip() returns a pointer to the connected IP address in -binary form or all zeros if not set. - -BIO_get_conn_int_port() returns the connected port or 0 if none was -set. - BIO_set_nbio() always returns 1. BIO_do_connect() returns 1 if the connection was successfully @@ -188,6 +185,12 @@ to retrieve a page and copy the result to standard output. L +=head1 HISTORY + +BIO_set_conn_int_port(), BIO_get_conn_int_port(), BIO_set_conn_ip(), and BIO_get_conn_ip() +were removed in OpenSSL 1.1.0. +Use BIO_set_conn_address() and BIO_get_conn_address() instead. + =head1 COPYRIGHT Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. -- 2.25.1