1gnutls_handshake(3)                 gnutls                 gnutls_handshake(3)
2
3
4

NAME

6       gnutls_handshake - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_handshake(gnutls_session_t session);
12

ARGUMENTS

14       gnutls_session_t session
15                   is a gnutls_session_t structure.
16

DESCRIPTION

18       This  function does the handshake of the TLS/SSL protocol, and initial‐
19       izes the TLS connection.
20
21       This function will fail if any problem is encountered, and will  return
22       a  negative error code. In case of a client, if the client has asked to
23       resume a session, but the server couldn't, then a full  handshake  will
24       be performed.
25
26       The  non-fatal  errors  such as GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED
27       interrupt the handshake procedure, which should be  later  be  resumed.
28       Call    this    function    again,    until    it    returns   0;   cf.
29       gnutls_record_get_direction() and gnutls_error_is_fatal().
30
31       If this function is called by a server after a rehandshake request then
32       GNUTLS_E_GOT_APPLICATION_DATA or GNUTLS_E_WARNING_ALERT_RECEIVED may be
33       returned.  Note that these are non fatal errors, only in  the  specific
34       case  of  a rehandshake.  Their meaning is that the client rejected the
35       rehandshake request or in the case of GNUTLS_E_GOT_APPLICATION_DATA  it
36       might also mean that some data were pending.
37

RETURNS

39       GNUTLS_E_SUCCESS on success, otherwise an error.
40

REPORTING BUGS

42       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
43       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
44       http://www.gnu.org/gethelp/
45
47       Copyright © 2008 Free Software Foundation.
48       Copying  and  distribution  of this file, with or without modification,
49       are permitted in any medium  without  royalty  provided  the  copyright
50       notice and this notice are preserved.
51

SEE ALSO

53       The  full  documentation  for gnutls is maintained as a Texinfo manual.
54       If the info and gnutls programs are properly installed  at  your  site,
55       the command
56
57              info gnutls
58
59       should give you access to the complete manual.
60
61
62
63gnutls                             2.12.6.1                gnutls_handshake(3)
Impressum