1gnutls_server_name_set(3)           gnutls           gnutls_server_name_set(3)
2
3
4

NAME

6       gnutls_server_name_set - API function
7

SYNOPSIS

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

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t type.
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  excluding  the  terminating  null
26                   byte
27

DESCRIPTION

29       This  function  is to be used by clients that want to inform (via a TLS
30       extension mechanism) the server of the name they  connected  to.   This
31       should be used by clients that connect to servers that do virtual host‐
32       ing.
33
34       The  value  of   name  depends  on  the   type  type.    In   case   of
35       GNUTLS_NAME_DNS,  a  UTF-8  null-terminated domain name string, without
36       the trailing dot, is expected.
37
38       IPv4 or IPv6 addresses are not permitted to be set  by  this  function.
39       If  the  function  is  called  with a name of  name_length zero it will
40       clear all server names set.
41

RETURNS

43       On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative  er‐
44       ror code is returned.
45

REPORTING BUGS

47       Report bugs to <bugs@gnutls.org>.
48       Home page: https://www.gnutls.org
49
50
52       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
53       Copying  and  distribution  of this file, with or without modification,
54       are permitted in any medium without royalty provided the copyright  no‐
55       tice and this notice are preserved.
56

SEE ALSO

58       The  full  documentation  for gnutls is maintained as a Texinfo manual.
59       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
60       visit
61
62       https://www.gnutls.org/manual/
63
64gnutls                               3.8.2           gnutls_server_name_set(3)
Impressum