1gnutls_bye(3)                       gnutls                       gnutls_bye(3)
2
3
4

NAME

6       gnutls_bye - This function terminates the current TLS/SSL connection.
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how);
12

ARGUMENTS

14       gnutls_session_t session
15                   is a gnutls_session_t structure.
16
17       gnutls_close_request_t how
18                   is an integer
19

DESCRIPTION

21       Terminates  the  current TLS/SSL connection. The connection should have
22       been  initiated  using  gnutls_handshake().   how  should  be  one   of
23       GNUTLS_SHUT_RDWR, GNUTLS_SHUT_WR.
24
25       In case of GNUTLS_SHUT_RDWR then the TLS connection gets terminated and
26       further receives and sends will be disallowed. If the return  value  is
27       zero  you may continue using the connection.  GNUTLS_SHUT_RDWR actually
28       sends an alert containing a close request and waits  for  the  peer  to
29       reply with the same message.
30
31       In  case  of GNUTLS_SHUT_WR then the TLS connection gets terminated and
32       further sends will be disallowed. In order to reuse the connection  you
33       should  wait  for  an EOF from the peer.  GNUTLS_SHUT_WR sends an alert
34       containing a close request.
35
36       Note that not all implementations will properly terminate a TLS connec‐
37       tion.   Some  of  them, usually for performance reasons, will terminate
38       only the underlying transport layer, thus causing a transmission  error
39       to the peer.  This error cannot be distinguished from a malicious party
40       prematurely terminating the session, thus this behavior is  not  recom‐
41       mended.
42
43       This  function  may also return GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED;
44       cf.  gnutls_record_get_direction().
45

REPORTING BUGS

47       Report bugs to <bug-gnutls@gnu.org>.
48
50       Copyright © 2006 Free Software Foundation.
51       Permission is granted to make and distribute verbatim  copies  of  this
52       manual  provided  the  copyright  notice and this permission notice are
53       preserved on all copies.
54

SEE ALSO

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