1gnutls_init(3)                      gnutls                      gnutls_init(3)
2
3
4

NAME

6       gnutls_init - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_init(gnutls_session_t * session, unsigned int flags);
12

ARGUMENTS

14       gnutls_session_t * session
15                   is a pointer to a gnutls_session_t structure.
16
17       unsigned int flags
18                   indicate  if  this  session  is  to  be  used for server or
19                   client.
20

DESCRIPTION

22       This function initializes the current session to  null.  Every  session
23       must  be  initialized  before  use, so internal structures can be allo‐
24       cated.  This function allocates structures which can only be free'd  by
25       calling gnutls_deinit().  Returns GNUTLS_E_SUCCESS (0) on success.
26
27        flags  can  be  one  of  GNUTLS_CLIENT  and  GNUTLS_SERVER. For a DTLS
28       entity, the flags GNUTLS_DATAGRAM and  GNUTLS_NONBLOCK are also  avail‐
29       able.  The latter flag will enable a non-blocking operation of the DTLS
30       timers.
31
32       The flag GNUTLS_NO_REPLAY_PROTECTION will disable any replay protection
33       in  DTLS  mode.  That must only used when replay protection is achieved
34       using other means.
35
36       Note that since version 3.1.2 this function  enables  some  common  TLS
37       extensions  such as session tickets and OCSP certificate status request
38       in client side by default. To prevent that use the GNUTLS_NO_EXTENSIONS
39       flag.
40

RETURNS

42       GNUTLS_E_SUCCESS on success, or an error code.
43

REPORTING BUGS

45       Report bugs to <bugs@gnutls.org>.
46       Home page: http://www.gnutls.org
47
48
50       Copyright © 2001-2014 Free Software Foundation, Inc..
51       Copying  and  distribution  of this file, with or without modification,
52       are permitted in any medium  without  royalty  provided  the  copyright
53       notice and this notice are preserved.
54

SEE ALSO

56       The  full  documentation  for gnutls is maintained as a Texinfo manual.
57       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
58       visit
59
60       http://www.gnutls.org/manual/
61
62gnutls                              3.3.29                      gnutls_init(3)
Impressum