diff options
Diffstat (limited to 'src/lib/libtls/man/tls_client.3')
| -rw-r--r-- | src/lib/libtls/man/tls_client.3 | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/lib/libtls/man/tls_client.3 b/src/lib/libtls/man/tls_client.3 deleted file mode 100644 index 98f58d4c20..0000000000 --- a/src/lib/libtls/man/tls_client.3 +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | .\" $OpenBSD: tls_client.3,v 1.4 2017/08/12 03:41:48 jsing Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: August 12 2017 $ | ||
| 18 | .Dt TLS_CLIENT 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm tls_client , | ||
| 22 | .Nm tls_server , | ||
| 23 | .Nm tls_configure , | ||
| 24 | .Nm tls_reset , | ||
| 25 | .Nm tls_free | ||
| 26 | .Nd configure a TLS connection | ||
| 27 | .Sh SYNOPSIS | ||
| 28 | .In tls.h | ||
| 29 | .Ft struct tls * | ||
| 30 | .Fn tls_client void | ||
| 31 | .Ft struct tls * | ||
| 32 | .Fn tls_server void | ||
| 33 | .Ft int | ||
| 34 | .Fo tls_configure | ||
| 35 | .Fa "struct tls *ctx" | ||
| 36 | .Fa "struct tls_config *config" | ||
| 37 | .Fc | ||
| 38 | .Ft void | ||
| 39 | .Fn tls_free "struct tls *ctx" | ||
| 40 | .Ft void | ||
| 41 | .Fn tls_reset "struct tls *ctx" | ||
| 42 | .Sh DESCRIPTION | ||
| 43 | A TLS connection is represented as a | ||
| 44 | .Vt struct tls | ||
| 45 | object called a | ||
| 46 | .Dq context . | ||
| 47 | A new context is created by either the | ||
| 48 | .Fn tls_client | ||
| 49 | or | ||
| 50 | .Fn tls_server | ||
| 51 | functions. | ||
| 52 | .Fn tls_client | ||
| 53 | is used in TLS client programs, | ||
| 54 | .Fn tls_server | ||
| 55 | in TLS server programs. | ||
| 56 | .Pp | ||
| 57 | The context can then be configured with the function | ||
| 58 | .Fn tls_configure . | ||
| 59 | The same | ||
| 60 | .Vt tls_config | ||
| 61 | object can be used to configure multiple contexts. | ||
| 62 | .Pp | ||
| 63 | After configuration, | ||
| 64 | .Xr tls_connect 3 | ||
| 65 | can be called on objects created with | ||
| 66 | .Fn tls_client , | ||
| 67 | and | ||
| 68 | .Xr tls_accept_socket 3 | ||
| 69 | on objects created with | ||
| 70 | .Fn tls_server . | ||
| 71 | .Pp | ||
| 72 | After use, a TLS context should be closed with | ||
| 73 | .Xr tls_close 3 , | ||
| 74 | and then freed by calling | ||
| 75 | .Fn tls_free . | ||
| 76 | If | ||
| 77 | .Fn tls_free | ||
| 78 | is called with an argument of | ||
| 79 | .Dv NULL , | ||
| 80 | no action occurs. | ||
| 81 | .Pp | ||
| 82 | A TLS context can be reset by calling | ||
| 83 | .Fn tls_reset , | ||
| 84 | allowing for it to be reused. | ||
| 85 | This is essentially equivalent to calling | ||
| 86 | .Fn tls_free , | ||
| 87 | followed by a call to the same function that was used to originally allocate | ||
| 88 | the TLS context. | ||
| 89 | .Sh RETURN VALUES | ||
| 90 | .Fn tls_client | ||
| 91 | and | ||
| 92 | .Fn tls_server | ||
| 93 | return | ||
| 94 | .Dv NULL | ||
| 95 | on error or an out of memory condition. | ||
| 96 | .Pp | ||
| 97 | .Fn tls_configure | ||
| 98 | returns 0 on success or -1 on error. | ||
| 99 | .Sh SEE ALSO | ||
| 100 | .Xr tls_accept_socket 3 , | ||
| 101 | .Xr tls_config_new 3 , | ||
| 102 | .Xr tls_connect 3 , | ||
| 103 | .Xr tls_init 3 | ||
| 104 | .Sh HISTORY | ||
| 105 | These functions appeared in | ||
| 106 | .Ox 5.6 | ||
| 107 | and got their final names in | ||
| 108 | .Ox 5.7 . | ||
| 109 | .Sh AUTHORS | ||
| 110 | .An Joel Sing Aq Mt jsing@openbsd.org | ||
