1gnutls_server_name_set(3) gnutls gnutls_server_name_set(3)
2
3
4
6 gnutls_server_name_set - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_server_name_set(gnutls_session_t session,
12 gnutls_server_name_type_t type, const void * name, size_t name_length);
13
15 gnutls_session_t session
16 is a gnutls_session_t structure.
17
18 gnutls_server_name_type_t type
19 specifies the indicator type
20
21 const void * name
22 is a string that contains the server name.
23
24 size_t name_length
25 holds the length of name
26
28 This function is to be used by clients that want to inform (via a TLS
29 extension mechanism) the server of the name they connected to. This
30 should be used by clients that connect to servers that do virtual host‐
31 ing.
32
33 The value of name depends on the type type. In case of
34 GNUTLS_NAME_DNS, an ASCII zero-terminated domain name string, without
35 the trailing dot, is expected. IPv4 or IPv6 addresses are not permit‐
36 ted.
37
39 On success, GNUTLS_E_SUCCESS (zero) is returned, otherwise an error
40 code is returned.
41
43 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
44 http://www.gnu.org/software/gnutls/ General help using GNU software:
45 http://www.gnu.org/gethelp/
46
48 Copyright © 2008 Free Software Foundation.
49 Copying and distribution of this file, with or without modification,
50 are permitted in any medium without royalty provided the copyright
51 notice and this notice are preserved.
52
54 The full documentation for gnutls is maintained as a Texinfo manual.
55 If the info and gnutls programs are properly installed at your site,
56 the command
57
58 info gnutls
59
60 should give you access to the complete manual.
61
62
63
64gnutls 2.12.6.1 gnutls_server_name_set(3)