summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjmc <>2015-09-14 14:29:30 +0000
committerjmc <>2015-09-14 14:29:30 +0000
commitc6db285cf151a049bedc7474c2cd3a3d2d5510d1 (patch)
tree090de9a249770de07d0c872d6160da26cff51126 /src/lib
parent201f9cf02bc9da2919ed87e7e65f71fc6b5a5a9f (diff)
downloadopenbsd-c6db285cf151a049bedc7474c2cd3a3d2d5510d1.tar.gz
openbsd-c6db285cf151a049bedc7474c2cd3a3d2d5510d1.tar.bz2
openbsd-c6db285cf151a049bedc7474c2cd3a3d2d5510d1.zip
some conn_version and conn_cipher bits;
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libtls/Makefile4
-rw-r--r--src/lib/libtls/tls_init.315
2 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libtls/Makefile b/src/lib/libtls/Makefile
index 6e5914685c..2e6c48716c 100644
--- a/src/lib/libtls/Makefile
+++ b/src/lib/libtls/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.19 2015/09/12 21:00:38 beck Exp $ 1# $OpenBSD: Makefile,v 1.20 2015/09/14 14:29:30 jmc Exp $
2 2
3CFLAGS+= -Wall -Werror -Wimplicit 3CFLAGS+= -Wall -Werror -Wimplicit
4CFLAGS+= -DLIBRESSL_INTERNAL 4CFLAGS+= -DLIBRESSL_INTERNAL
@@ -52,6 +52,8 @@ MLINKS+=tls_init.3 tls_peer_cert_contains_name.3
52MLINKS+=tls_init.3 tls_peer_cert_issuer.3 52MLINKS+=tls_init.3 tls_peer_cert_issuer.3
53MLINKS+=tls_init.3 tls_peer_cert_subject.3 53MLINKS+=tls_init.3 tls_peer_cert_subject.3
54MLINKS+=tls_init.3 tls_peer_cert_hash.3 54MLINKS+=tls_init.3 tls_peer_cert_hash.3
55MLINKS+=tls_init.3 tls_conn_version.3
56MLINKS+=tls_init.3 tls_conn_cipher.3
55MLINKS+=tls_init.3 tls_load_file.3 57MLINKS+=tls_init.3 tls_load_file.3
56MLINKS+=tls_init.3 tls_client.3 58MLINKS+=tls_init.3 tls_client.3
57MLINKS+=tls_init.3 tls_server.3 59MLINKS+=tls_init.3 tls_server.3
diff --git a/src/lib/libtls/tls_init.3 b/src/lib/libtls/tls_init.3
index 81ab97b0c4..fbd6cb5e12 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.45 2015/09/14 12:05:33 schwarze Exp $ 1.\" $OpenBSD: tls_init.3,v 1.46 2015/09/14 14:29:30 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" 4.\"
@@ -48,6 +48,8 @@
48.Nm tls_peer_cert_issuer , 48.Nm tls_peer_cert_issuer ,
49.Nm tls_peer_cert_subject , 49.Nm tls_peer_cert_subject ,
50.Nm tls_peer_cert_hash , 50.Nm tls_peer_cert_hash ,
51.Nm tls_conn_version ,
52.Nm tls_conn_cipher ,
51.Nm tls_load_file , 53.Nm tls_load_file ,
52.Nm tls_client , 54.Nm tls_client ,
53.Nm tls_server , 55.Nm tls_server ,
@@ -420,23 +422,20 @@ can be generated using the commands:
420h=$(openssl x509 -outform der -in mycert.crt | sha256) 422h=$(openssl x509 -outform der -in mycert.crt | sha256)
421printf "SHA256:${h}\\n" 423printf "SHA256:${h}\\n"
422.Ed 424.Ed
423.Pp
424.It 425.It
425.Fn tls_conn_version 426.Fn tls_conn_version
426returns a string 427returns a string
427corresponding to a TLS version negotiated with the peer 428corresponding to a TLS version negotiated with the peer
428connected to 429connected to
429.Ar ctx 430.Ar ctx .
430.It
431.Fn tls_conn_version 431.Fn tls_conn_version
432will only succeed after the handshake is complete. 432will only succeed after the handshake is complete.
433.It 433.It
434.Fn tls_conn_cipher 434.Fn tls_conn_cipher
435returns a string 435returns a string
436corresponding to a the cipher suite negotated with the peer 436corresponding to a the cipher suite negotated with the peer
437connected to 437connected to
438.Ar ctx 438.Ar ctx .
439.It
440.Fn tls_conn_cipher 439.Fn tls_conn_cipher
441will only succeed after the handshake is complete. 440will only succeed after the handshake is complete.
442.Em (Server and client) 441.Em (Server and client)