Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_handshake.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_handshake" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_handshake \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_handshake(gnutls_session_t " session ");"
9 .SH ARGUMENTS
10 .IP "gnutls_session_t session" 12
11 is a \fBgnutls_session_t\fP structure.
12 .SH "DESCRIPTION"
13 This function does the handshake of the TLS/SSL protocol, and
14 initializes the TLS connection.
15
16 This function will fail if any problem is encountered, and will
17 return a negative error code. In case of a client, if the client
18 has asked to resume a session, but the server couldn't, then a
19 full handshake will be performed.
20
21 The non\-fatal errors such as \fBGNUTLS_E_AGAIN\fP and
22 \fBGNUTLS_E_INTERRUPTED\fP interrupt the handshake procedure, which
23 should be later be resumed.  Call this function again, until it
24 returns 0; cf.  \fBgnutls_record_get_direction()\fP and
25 \fBgnutls_error_is_fatal()\fP.
26
27 If this function is called by a server after a rehandshake request
28 then \fBGNUTLS_E_GOT_APPLICATION_DATA\fP or
29 \fBGNUTLS_E_WARNING_ALERT_RECEIVED\fP may be returned.  Note that these
30 are non fatal errors, only in the specific case of a rehandshake.
31 Their meaning is that the client rejected the rehandshake request or
32 in the case of \fBGNUTLS_E_GOT_APPLICATION_DATA\fP it might also mean that
33 some data were pending.
34 .SH "RETURNS"
35 \fBGNUTLS_E_SUCCESS\fP on success, otherwise an error.
36 .SH "REPORTING BUGS"
37 Report bugs to <bug-gnutls@gnu.org>.
38 GnuTLS home page: http://www.gnu.org/software/gnutls/
39 General help using GNU software: http://www.gnu.org/gethelp/
40 .SH COPYRIGHT
41 Copyright \(co 2008 Free Software Foundation.
42 .br
43 Copying and distribution of this file, with or without modification,
44 are permitted in any medium without royalty provided the copyright
45 notice and this notice are preserved.
46 .SH "SEE ALSO"
47 The full documentation for
48 .B gnutls
49 is maintained as a Texinfo manual.  If the
50 .B info
51 and
52 .B gnutls
53 programs are properly installed at your site, the command
54 .IP
55 .B info gnutls
56 .PP
57 should give you access to the complete manual.