summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortedu <>2016-09-13 13:40:58 +0000
committertedu <>2016-09-13 13:40:58 +0000
commitec28f07967d280a912717c229dc810fb3610d140 (patch)
treee07a9af065bd67d2eb0969cef5b94456bb56c434
parent1e979b1528a3af0189c6d97e6aae90a03b1e5972 (diff)
downloadopenbsd-ec28f07967d280a912717c229dc810fb3610d140.tar.gz
openbsd-ec28f07967d280a912717c229dc810fb3610d140.tar.bz2
openbsd-ec28f07967d280a912717c229dc810fb3610d140.zip
add a little more typing to the first callback argument.
it's always a tls context.
-rw-r--r--src/lib/libtls/tls.h6
-rw-r--r--src/lib/libtls/tls_init.38
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h
index 0a9c163250..6cc3d0d6f8 100644
--- a/src/lib/libtls/tls.h
+++ b/src/lib/libtls/tls.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.h,v 1.37 2016/09/04 14:15:44 jsing Exp $ */ 1/* $OpenBSD: tls.h,v 1.38 2016/09/13 13:40:58 tedu Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -44,9 +44,9 @@ extern "C" {
44struct tls; 44struct tls;
45struct tls_config; 45struct tls_config;
46 46
47typedef ssize_t (*tls_read_cb)(void *_ctx, void *_buf, size_t _buflen, 47typedef ssize_t (*tls_read_cb)(struct tls *_ctx, void *_buf, size_t _buflen,
48 void *_cb_arg); 48 void *_cb_arg);
49typedef ssize_t (*tls_write_cb)(void *_ctx, const void *_buf, 49typedef ssize_t (*tls_write_cb)(struct tls *_ctx, const void *_buf,
50 size_t _buflen, void *_cb_arg); 50 size_t _buflen, void *_cb_arg);
51 51
52int tls_init(void); 52int tls_init(void);
diff --git a/src/lib/libtls/tls_init.3 b/src/lib/libtls/tls_init.3
index 90133a20ce..6059c3f8a0 100644
--- a/src/lib/libtls/tls_init.3
+++ b/src/lib/libtls/tls_init.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: tls_init.3,v 1.71 2016/09/04 16:37:18 jmc Exp $ 1.\" $OpenBSD: tls_init.3,v 1.72 2016/09/13 13:40:58 tedu Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: September 4 2016 $ 17.Dd $Mdocdate: September 13 2016 $
18.Dt TLS_INIT 3 18.Dt TLS_INIT 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -189,13 +189,13 @@
189.Ft "int" 189.Ft "int"
190.Fn tls_connect_socket "struct tls *ctx" "int s" "const char *servername" 190.Fn tls_connect_socket "struct tls *ctx" "int s" "const char *servername"
191.Ft "int" 191.Ft "int"
192.Fn tls_connect_cbs "struct tls *ctx" "ssize_t (*tls_read_cb)(void *ctx, void *buf, size_t buflen, void *cb_arg)" "ssize_t (*tls_write_cb)(void *ctx, const void *buf, size_t buflen, void *cb_arg)" "void *cb_arg" "const char *servername" 192.Fn tls_connect_cbs "struct tls *ctx" "ssize_t (*tls_read_cb)(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)" "ssize_t (*tls_write_cb)(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)" "void *cb_arg" "const char *servername"
193.Ft "int" 193.Ft "int"
194.Fn tls_accept_fds "struct tls *tls" "struct tls **cctx" "int fd_read" "int fd_write" 194.Fn tls_accept_fds "struct tls *tls" "struct tls **cctx" "int fd_read" "int fd_write"
195.Ft "int" 195.Ft "int"
196.Fn tls_accept_socket "struct tls *tls" "struct tls **cctx" "int socket" 196.Fn tls_accept_socket "struct tls *tls" "struct tls **cctx" "int socket"
197.Ft "int" 197.Ft "int"
198.Fn tls_accept_cbs "struct tls *ctx" "struct tls **cctx" "ssize_t (*tls_read_cb)(void *ctx, void *buf, size_t buflen, void *cb_arg)" "ssize_t (*tls_write_cb)(void *ctx, const void *buf, size_t buflen, void *cb_arg)" "void *cb_arg" 198.Fn tls_accept_cbs "struct tls *ctx" "struct tls **cctx" "ssize_t (*tls_read_cb)(struct *ctx, void *buf, size_t buflen, void *cb_arg)" "ssize_t (*tls_write_cb)(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)" "void *cb_arg"
199.Ft "int" 199.Ft "int"
200.Fn tls_handshake "struct tls *ctx" 200.Fn tls_handshake "struct tls *ctx"
201.Ft "ssize_t" 201.Ft "ssize_t"