diff options
| author | schwarze <> | 2018-02-14 18:09:13 +0000 |
|---|---|---|
| committer | schwarze <> | 2018-02-14 18:09:13 +0000 |
| commit | 44986c14054bc744dfc0d766fbca6718d4c4e60a (patch) | |
| tree | c46e8636732257a6fadcfd2dbbc07aae474bca4a /src | |
| parent | d4fc85d07ebed1299aa40ee793f87da2cef4a065 (diff) | |
| download | openbsd-44986c14054bc744dfc0d766fbca6718d4c4e60a.tar.gz openbsd-44986c14054bc744dfc0d766fbca6718d4c4e60a.tar.bz2 openbsd-44986c14054bc744dfc0d766fbca6718d4c4e60a.zip | |
In ssl.h rev. 1.136 2018/02/14 17:08:44, jsing@ provided
SSL_CTX_up_ref(3). Merge the related documentation from OpenSSL,
but tweak the wording to be less confusing and simplify the RETURN
VALUES section.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/man/SSL_CTX_new.3 | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_new.3 b/src/lib/libssl/man/SSL_CTX_new.3 index 0c846ceade..64f8ea713c 100644 --- a/src/lib/libssl/man/SSL_CTX_new.3 +++ b/src/lib/libssl/man/SSL_CTX_new.3 | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | .\" $OpenBSD: SSL_CTX_new.3,v 1.3 2017/08/19 23:45:10 schwarze Exp $ | 1 | .\" $OpenBSD: SSL_CTX_new.3,v 1.4 2018/02/14 18:09:13 schwarze Exp $ |
| 2 | .\" OpenSSL 21cd6e00 Aug 17 15:21:33 2015 -0400 | 2 | .\" full merge up to: OpenSSL 21cd6e00 Oct 21 14:40:15 2015 +0100 |
| 3 | .\" selective merge up to: OpenSSL eb43101f Dec 9 18:07:09 2016 +0100 | ||
| 3 | .\" | 4 | .\" |
| 4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | 5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. |
| 5 | .\" Copyright (c) 2000, 2005, 2012, 2013, 2015, 2016 The OpenSSL Project. | 6 | .\" Copyright (c) 2000, 2005, 2012, 2013, 2015, 2016 The OpenSSL Project. |
| @@ -49,11 +50,12 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 52 | .\" |
| 52 | .Dd $Mdocdate: August 19 2017 $ | 53 | .Dd $Mdocdate: February 14 2018 $ |
| 53 | .Dt SSL_CTX_NEW 3 | 54 | .Dt SSL_CTX_NEW 3 |
| 54 | .Os | 55 | .Os |
| 55 | .Sh NAME | 56 | .Sh NAME |
| 56 | .Nm SSL_CTX_new , | 57 | .Nm SSL_CTX_new , |
| 58 | .Nm SSL_CTX_up_ref , | ||
| 57 | .Nm TLS_method , | 59 | .Nm TLS_method , |
| 58 | .Nm TLS_server_method , | 60 | .Nm TLS_server_method , |
| 59 | .Nm TLS_client_method , | 61 | .Nm TLS_client_method , |
| @@ -77,6 +79,8 @@ | |||
| 77 | .In openssl/ssl.h | 79 | .In openssl/ssl.h |
| 78 | .Ft SSL_CTX * | 80 | .Ft SSL_CTX * |
| 79 | .Fn SSL_CTX_new "const SSL_METHOD *method" | 81 | .Fn SSL_CTX_new "const SSL_METHOD *method" |
| 82 | .Ft int | ||
| 83 | .Fn SSL_CTX_up_ref "SSL_CTX *ctx" | ||
| 80 | .Ft const SSL_METHOD * | 84 | .Ft const SSL_METHOD * |
| 81 | .Fn TLS_method void | 85 | .Fn TLS_method void |
| 82 | .Ft const SSL_METHOD * | 86 | .Ft const SSL_METHOD * |
| @@ -122,6 +126,23 @@ It initializes the list of ciphers, the session cache setting, the | |||
| 122 | callbacks, the keys and certificates, and the options to its default | 126 | callbacks, the keys and certificates, and the options to its default |
| 123 | values. | 127 | values. |
| 124 | .Pp | 128 | .Pp |
| 129 | An | ||
| 130 | .Vt SSL_CTX | ||
| 131 | object is reference counted. | ||
| 132 | Creating a new | ||
| 133 | .Vt SSL_CTX | ||
| 134 | object sets its reference count to 1. | ||
| 135 | Calling | ||
| 136 | .Fn SSL_CTX_up_ref | ||
| 137 | on it increments the reference count by 1. | ||
| 138 | Calling | ||
| 139 | .Xr SSL_CTX_free 3 | ||
| 140 | on it decrements the reference count by 1. | ||
| 141 | When the reference count drops to zero, | ||
| 142 | any memory or resources allocated to the | ||
| 143 | .Vt SSL_CTX | ||
| 144 | object are freed. | ||
| 145 | .Pp | ||
| 125 | The | 146 | The |
| 126 | .Vt SSL_CTX | 147 | .Vt SSL_CTX |
| 127 | object uses | 148 | object uses |
| @@ -202,18 +223,14 @@ In clients, when a protocol version is disabled without disabling | |||
| 202 | all previous protocol versions, the effect is to also disable all | 223 | all previous protocol versions, the effect is to also disable all |
| 203 | subsequent protocol versions. | 224 | subsequent protocol versions. |
| 204 | .Sh RETURN VALUES | 225 | .Sh RETURN VALUES |
| 205 | The following return values can occur: | 226 | .Fn SSL_CTX_new |
| 206 | .Bl -tag -width Ds | 227 | returns a pointer to the newly allocated object or |
| 207 | .It Dv NULL | 228 | .Dv NULL |
| 208 | The creation of a new | 229 | on failure. |
| 209 | .Vt SSL_CTX | 230 | Check the error stack to find out the reason for failure. |
| 210 | object failed. | 231 | .Pp |
| 211 | Check the error stack to find out the reason. | 232 | .Fn SSL_CTX_up_ref |
| 212 | .It Pointer to an SSL_CTX object | 233 | returns 1 for success or 0 for failure. |
| 213 | The return value points to an allocated | ||
| 214 | .Vt SSL_CTX | ||
| 215 | object. | ||
| 216 | .El | ||
| 217 | .Sh SEE ALSO | 234 | .Sh SEE ALSO |
| 218 | .Xr ssl 3 , | 235 | .Xr ssl 3 , |
| 219 | .Xr SSL_accept 3 , | 236 | .Xr SSL_accept 3 , |
