1gnutls_server_name_get(3) gnutls gnutls_server_name_get(3)
2
3
4
6 gnutls_server_name_get - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_server_name_get(gnutls_session_t session, void * data,
12 size_t * data_length, unsigned int * type, unsigned int indx);
13
15 gnutls_session_t session
16 is a gnutls_session_t type.
17
18 void * data will hold the data
19
20 size_t * data_length
21 will hold the data length. Must hold the maximum size of
22 data.
23
24 unsigned int * type
25 will hold the server name indicator type
26
27 unsigned int indx
28 is the index of the server_name
29
31 This function will allow you to get the name indication (if any), a
32 client has sent. The name indication may be any of the enumeration
33 gnutls_server_name_type_t.
34
35 If type is GNUTLS_NAME_DNS, then this function is to be used by
36 servers that support virtual hosting, and the data will be a null ter‐
37 minated IDNA ACE string (prior to GnuTLS 3.4.0 it was a UTF-8 string).
38
39 If data has not enough size to hold the server name
40 GNUTLS_E_SHORT_MEMORY_BUFFER is returned, and data_length will hold
41 the required size.
42
43 indx is used to retrieve more than one server names (if sent by the
44 client). The first server name has an index of 0, the second 1 and so
45 on. If no name with the given index exists
46 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
47
49 On success, GNUTLS_E_SUCCESS (0) is returned, on UTF-8 decoding error
50 GNUTLS_E_IDNA_ERROR is returned, otherwise a negative error code is
51 returned.
52
54 Report bugs to <bugs@gnutls.org>.
55 Home page: http://www.gnutls.org
56
57
59 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
60 Copying and distribution of this file, with or without modification,
61 are permitted in any medium without royalty provided the copyright
62 notice and this notice are preserved.
63
65 The full documentation for gnutls is maintained as a Texinfo manual.
66 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
67 visit
68
69 http://www.gnutls.org/manual/
70
71gnutls 3.6.5 gnutls_server_name_get(3)