1gnutls_handshake(3) gnutls gnutls_handshake(3)
2
3
4
6 gnutls_handshake - This is the main function in the handshake protocol.
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_handshake(gnutls_session_t session);
12
14 gnutls_session_t session
15 is a gnutls_session_t structure.
16
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.
36
38 Report bugs to <bug-gnutls@gnu.org>.
39
41 Copyright © 2006 Free Software Foundation.
42 Permission is granted to make and distribute verbatim copies of this
43 manual provided the copyright notice and this permission notice are
44 preserved on all copies.
45
47 The full documentation for gnutls is maintained as a Texinfo manual.
48 If the info and gnutls programs are properly installed at your site,
49 the command
50
51 info gnutls
52
53 should give you access to the complete manual.
54
55
56
57gnutls 1.6.3 gnutls_handshake(3)