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 (0)-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 (0) is returned, otherwise a negative
40 error code is returned.
41
43 Report bugs to <bugs@gnutls.org>.
44 Home page: http://www.gnutls.org
45
46
48 Copyright © 2001-2014 Free Software Foundation, Inc..
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 /usr/share/doc/gnutls/ directory does not contain the HTML form
56 visit
57
58 http://www.gnutls.org/manual/
59
60gnutls 3.3.29 gnutls_server_name_set(3)