summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_init.3
diff options
context:
space:
mode:
authorjsing <>2015-02-11 07:01:10 +0000
committerjsing <>2015-02-11 07:01:10 +0000
commit53b67cf53ae755b09e315a3bd30e87b66c4ea769 (patch)
treec6f7f9e067233df00a99495d7e346482bb70b61e /src/lib/libtls/tls_init.3
parentc6f3fe1fbc8da2fa6de30b10f1f219ab1f809438 (diff)
downloadopenbsd-53b67cf53ae755b09e315a3bd30e87b66c4ea769.tar.gz
openbsd-53b67cf53ae755b09e315a3bd30e87b66c4ea769.tar.bz2
openbsd-53b67cf53ae755b09e315a3bd30e87b66c4ea769.zip
Provide a tls_connect_servername() function that has the same behaviour
as tls_connect(), however allows the name to use for verification to be explicitly provided, rather than being inferred from the host value. Requested by reyk@ ok reyk@ tedu@
Diffstat (limited to 'src/lib/libtls/tls_init.3')
-rw-r--r--src/lib/libtls/tls_init.310
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_init.3 b/src/lib/libtls/tls_init.3
index 034c125347..c1e59383c4 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.11 2015/02/11 06:46:33 jsing Exp $ 1.\" $OpenBSD: tls_init.3,v 1.12 2015/02/11 07:01:10 jsing Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" 4.\"
@@ -47,6 +47,7 @@
47.Nm tls_free , 47.Nm tls_free ,
48.Nm tls_connect , 48.Nm tls_connect ,
49.Nm tls_connect_fds , 49.Nm tls_connect_fds ,
50.Nm tls_connect_servername ,
50.Nm tls_connect_socket , 51.Nm tls_connect_socket ,
51.Nm tls_accept_socket , 52.Nm tls_accept_socket ,
52.Nm tls_read , 53.Nm tls_read ,
@@ -112,6 +113,7 @@
112.Fn tls_connect "struct tls *ctx" "const char *host" "const char *port" 113.Fn tls_connect "struct tls *ctx" "const char *host" "const char *port"
113.Ft "int" 114.Ft "int"
114.Fn tls_connect_fds "struct tls *ctx" "int fd_read" "int fd_write" "const char *servername" 115.Fn tls_connect_fds "struct tls *ctx" "int fd_read" "int fd_write" "const char *servername"
116.Fn tls_connect_servername "struct tls *ctx" "const char *host" "const char *port" "const char *servername"
115.Ft "int" 117.Ft "int"
116.Fn tls_connect_socket "struct tls *ctx" "int s" "const char *servername" 118.Fn tls_connect_socket "struct tls *ctx" "int s" "const char *servername"
117.Ft "int" 119.Ft "int"
@@ -159,6 +161,12 @@ A client connection is initiated after configuration by calling
159.Fn tls_connect . 161.Fn tls_connect .
160This function will create a new socket, connect to the specified host and 162This function will create a new socket, connect to the specified host and
161port, and then establish a secure connection. 163port, and then establish a secure connection.
164The
165.Fn tls_connect_servername
166function has the same behaviour, however the name to use for verification is
167explicitly provided, rather than being inferred from the
168.Ar host
169value.
162An already existing socket can be upgraded to a secure connection by calling 170An already existing socket can be upgraded to a secure connection by calling
163.Fn tls_connect_socket . 171.Fn tls_connect_socket .
164Alternatively, a secure connection can be established over a pair of existing 172Alternatively, a secure connection can be established over a pair of existing