summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-08-21 09:41:16 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-08-21 09:41:16 +0000
commit77f456bdb654850ed345973cf733bfb1d4e69493 (patch)
tree5e1ce69072b2865d1d969572bcd985afa4be3a81 /lib/libssl
parent1928bafcff1836abb48fe84f528658257590a380 (diff)
merge the applicable parts of SSL_set_tlsext_host_name(3) documentation;
from Paul Yang <yang dot yang at baishancloud dot com> via OpenSSL commit 190b9a03 Jun 28 15:46:13 2017 +0800
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.332
1 files changed, 28 insertions, 4 deletions
diff --git a/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 b/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3
index fc0e4536aa3..790954266c4 100644
--- a/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3
+++ b/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3
@@ -1,7 +1,9 @@
-.\" $OpenBSD: SSL_CTX_set_tlsext_servername_callback.3,v 1.1 2017/04/10 13:05:06 schwarze Exp $
+.\" $OpenBSD: SSL_CTX_set_tlsext_servername_callback.3,v 1.2 2017/08/21 09:41:15 schwarze Exp $
+.\" OpenSSL 190b9a03 Jun 28 15:46:13 2017 +0800
.\" OpenSSL 8c55c461 Mar 29 08:34:37 2017 +1000
.\"
.\" This file was written by Jon Spillett <jon.spillett@oracle.com>
+.\" and Paul Yang <yang dot yang at baishancloud dot com>.
.\" Copyright (c) 2000 The OpenSSL Project. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -48,14 +50,15 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 10 2017 $
+.Dd $Mdocdate: August 21 2017 $
.Dt SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK 3
.Os
.Sh NAME
.Nm SSL_CTX_set_tlsext_servername_callback ,
.Nm SSL_CTX_set_tlsext_servername_arg ,
.Nm SSL_get_servername_type ,
-.Nm SSL_get_servername
+.Nm SSL_get_servername ,
+.Nm SSL_set_tlsext_host_name
.Nd handle server name indication (SNI)
.Sh SYNOPSIS
.In openssl/ssl.h
@@ -78,6 +81,11 @@
.Fo SSL_get_servername_type
.Fa "const SSL *s"
.Fc
+.Ft int
+.Fo SSL_set_tlsext_host_name
+.Fa "const SSL *s"
+.Fa "const char *name"
+.Fc
.Sh DESCRIPTION
.Fn SSL_CTX_set_tlsext_servername_callback
sets the application callback
@@ -97,7 +105,20 @@ value is a pointer which is passed to the application callback.
sets a context-specific argument to be passed into the callback for
.Fa ctx .
.Pp
-Both functions are implemented as macros.
+.Fn SSL_set_tlsext_host_name
+sets the server name indication ClientHello extension
+to contain the value
+.Fa name ,
+or clears it if
+.Fa name
+is
+.Dv NULL .
+The type of server name indication
+extension is set to
+.Dv TLSEXT_NAMETYPE_host_name
+as defined in RFC 3546.
+.Pp
+All three functions are implemented as macros.
.Pp
The ALPN and SNI callbacks are both executed during Client Hello
processing.
@@ -119,6 +140,9 @@ otherwise.
returns the servername type or -1 if no servername is present.
Currently the only supported type (defined in RFC 3546) is
.Dv TLSEXT_NAMETYPE_host_name .
+.Pp
+.Fn SSL_set_tlsext_host_name
+returns 1 on success or 0 in case of an error.
.Sh SEE ALSO
.Xr SSL_CTX_callback_ctrl 3 ,
.Xr SSL_CTX_set_alpn_select_cb 3