.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "gnutls_handshake" 3 "3.1.11" "gnutls" "gnutls" .SH NAME gnutls_handshake \- API function .SH SYNOPSIS .B #include .sp .BI "int gnutls_handshake(gnutls_session_t " session ");" .SH ARGUMENTS .IP "gnutls_session_t session" 12 is a \fBgnutls_session_t\fP structure. .SH "DESCRIPTION" This function does the handshake of the TLS/SSL protocol, and initializes the TLS connection. This function will fail if any problem is encountered, and will return a negative error code. In case of a client, if the client has asked to resume a session, but the server couldn't, then a full handshake will be performed. The non\-fatal errors such as \fBGNUTLS_E_AGAIN\fP and \fBGNUTLS_E_INTERRUPTED\fP interrupt the handshake procedure, which should be resumed later. Call this function again, until it returns 0; cf. \fBgnutls_record_get_direction()\fP and \fBgnutls_error_is_fatal()\fP. If this function is called by a server after a rehandshake request then \fBGNUTLS_E_GOT_APPLICATION_DATA\fP or \fBGNUTLS_E_WARNING_ALERT_RECEIVED\fP may be returned. Note that these are non fatal errors, only in the specific case of a rehandshake. Their meaning is that the client rejected the rehandshake request or in the case of \fBGNUTLS_E_GOT_APPLICATION_DATA\fP it might also mean that some data were pending. .SH "RETURNS" \fBGNUTLS_E_SUCCESS\fP on success, otherwise a negative error code. .SH "REPORTING BUGS" Report bugs to . .br General guidelines for reporting bugs: http://www.gnu.org/gethelp/ .br GnuTLS home page: http://www.gnu.org/software/gnutls/ .SH COPYRIGHT Copyright \(co 2012 Free Software Foundation, Inc.. .br Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. .SH "SEE ALSO" The full documentation for .B gnutls is maintained as a Texinfo manual. If the .B info and .B gnutls programs are properly installed at your site, the command .IP .B info gnutls .PP should give you access to the complete manual. As an alternative you may obtain the manual from: .IP .B http://www.gnu.org/software/gnutls/manual/ .PP