summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjmc <>2015-09-11 14:15:19 +0000
committerjmc <>2015-09-11 14:15:19 +0000
commit774db32073b8b5964d8bb5940ad2543bee934b66 (patch)
tree51134ca33a8d9884ec3eb575bb1fd20763274d9e /src/lib
parent4fed0aed72c48fa0d340730ec63eeaa4bcf95443 (diff)
downloadopenbsd-774db32073b8b5964d8bb5940ad2543bee934b66.tar.gz
openbsd-774db32073b8b5964d8bb5940ad2543bee934b66.tar.bz2
openbsd-774db32073b8b5964d8bb5940ad2543bee934b66.zip
update NAME; various cleanup
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libtls/tls_init.340
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/libtls/tls_init.3 b/src/lib/libtls/tls_init.3
index c5b0c1df46..9eb825d463 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.39 2015/09/11 13:59:20 beck Exp $ 1.\" $OpenBSD: tls_init.3,v 1.40 2015/09/11 14:15:19 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" 4.\"
@@ -43,6 +43,8 @@
43.Nm tls_config_verify , 43.Nm tls_config_verify ,
44.Nm tls_config_verify_client , 44.Nm tls_config_verify_client ,
45.Nm tls_config_verify_client_optional , 45.Nm tls_config_verify_client_optional ,
46.Nm tls_peer_cert_provided ,
47.Nm tls_peer_cert_contains_name ,
46.Nm tls_load_file , 48.Nm tls_load_file ,
47.Nm tls_client , 49.Nm tls_client ,
48.Nm tls_server , 50.Nm tls_server ,
@@ -172,9 +174,7 @@ function returns a new default configuration that can be used for future
172connections. 174connections.
173Several functions exist to change the options of the configuration; see below. 175Several functions exist to change the options of the configuration; see below.
174.Pp 176.Pp
175A 177A TLS connection is represented as a
176.Em tls
177connection is represented as a
178.Em context . 178.Em context .
179A new 179A new
180.Em context 180.Em context
@@ -221,7 +221,7 @@ and
221Both of these functions will result in the TLS handshake being performed if it 221Both of these functions will result in the TLS handshake being performed if it
222has not already completed. 222has not already completed.
223.Pp 223.Pp
224After use, a tls 224After use, a TLS
225.Em context 225.Em context
226should be closed with 226should be closed with
227.Fn tls_close , 227.Fn tls_close ,
@@ -292,12 +292,12 @@ sets the public certificate directly from memory.
292.Fn tls_config_set_ciphers 292.Fn tls_config_set_ciphers
293sets the list of ciphers that may be used. 293sets the list of ciphers that may be used.
294Lists of ciphers are specified by name, and the 294Lists of ciphers are specified by name, and the
295permitted names are: 295permitted names are:
296.Pp 296.Pp
297.Bl -tag -width "default" -offset indent -compact 297.Bl -tag -width "default" -offset indent -compact
298.It Dv "secure" 298.It Dv "secure"
299.It Dv "default" (an alias for secure) 299.It Dv "default" (an alias for secure)
300.It Dv "legacy" 300.It Dv "legacy"
301.It Dv "compat" (an alias for legacy) 301.It Dv "compat" (an alias for legacy)
302.El 302.El
303.Pp 303.Pp
@@ -365,19 +365,19 @@ a certificate.
365.Em (Server) 365.Em (Server)
366.It 366.It
367.Fn tls_peer_cert_provided 367.Fn tls_peer_cert_provided
368checks if the peer of 368checks if the peer of
369.Ar ctx 369.Ar ctx
370has provided a certificate. 370has provided a certificate.
371.Fn tls_peer_cert_provided 371.Fn tls_peer_cert_provided
372can only succeed after the handshake is complete. 372can only succeed after the handshake is complete.
373.Em (Server and client) 373.Em (Server and client)
374.It 374.It
375.Fn tls_peer_cert_constains_name 375.Fn tls_peer_cert_contains_name
376checks if the peer of a tls 376checks if the peer of a TLS
377.Ar ctx 377.Ar ctx
378 has povided a certificate that contains a 378has povided a certificate that contains a
379SAN or CN that matches 379SAN or CN that matches
380.Ar name 380.Ar name .
381.Fn tls_peer_cert_contains_name 381.Fn tls_peer_cert_contains_name
382can only succeed after the handshake is complete. 382can only succeed after the handshake is complete.
383.Em (Server and client) 383.Em (Server and client)
@@ -448,17 +448,17 @@ The following functions create, prepare, and free a connection context.
448.Bl -bullet -offset four 448.Bl -bullet -offset four
449.It 449.It
450.Fn tls_client 450.Fn tls_client
451creates a new tls context for client connections. 451creates a new TLS context for client connections.
452.It 452.It
453.Fn tls_server 453.Fn tls_server
454creates a new tls context for server connections. 454creates a new TLS context for server connections.
455.It 455.It
456.Fn tls_configure 456.Fn tls_configure
457readies a tls context for use by applying the configuration 457readies a TLS context for use by applying the configuration
458options. 458options.
459.It 459.It
460.Fn tls_free 460.Fn tls_free
461frees a tls context after use. 461frees a TLS context after use.
462.El 462.El
463.Pp 463.Pp
464The following functions initiate a connection and perform input and output 464The following functions initiate a connection and perform input and output
@@ -528,11 +528,11 @@ or
528.Fn tls_connect_servername . 528.Fn tls_connect_servername .
529.El 529.El
530.Sh RETURN VALUES 530.Sh RETURN VALUES
531The 531The
532.Fn tls_peer_cert_provided 532.Fn tls_peer_cert_provided
533and 533and
534.Fn tls_peer_cert_contain_name 534.Fn tls_peer_cert_contains_name
535functions return 1 if the check succeeds, and 0 if it does not. 535functions return 1 if the check succeeds, and 0 if it does not.
536All other functions that return 536All other functions that return
537.Vt int 537.Vt int
538or 538or