diff options
| author | jsing <> | 2015-02-11 07:01:10 +0000 | 
|---|---|---|
| committer | jsing <> | 2015-02-11 07:01:10 +0000 | 
| commit | d641e8f3aa538ca2210627d0cd491ad424b56353 (patch) | |
| tree | c6f7f9e067233df00a99495d7e346482bb70b61e /src/lib/libtls/tls_init.3 | |
| parent | 18dcc969364b2ee37a91a47c36b37a6fb023fb98 (diff) | |
| download | openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.tar.gz openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.tar.bz2 openbsd-d641e8f3aa538ca2210627d0cd491ad424b56353.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 '')
| -rw-r--r-- | src/lib/libtls/tls_init.3 | 10 | 
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 . | 
| 160 | This function will create a new socket, connect to the specified host and | 162 | This function will create a new socket, connect to the specified host and | 
| 161 | port, and then establish a secure connection. | 163 | port, and then establish a secure connection. | 
| 164 | The | ||
| 165 | .Fn tls_connect_servername | ||
| 166 | function has the same behaviour, however the name to use for verification is | ||
| 167 | explicitly provided, rather than being inferred from the | ||
| 168 | .Ar host | ||
| 169 | value. | ||
| 162 | An already existing socket can be upgraded to a secure connection by calling | 170 | An already existing socket can be upgraded to a secure connection by calling | 
| 163 | .Fn tls_connect_socket . | 171 | .Fn tls_connect_socket . | 
| 164 | Alternatively, a secure connection can be established over a pair of existing | 172 | Alternatively, a secure connection can be established over a pair of existing | 
