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

NAME

6       gnutls_bye - API function
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 type.
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 the TLS session gets terminated and further
26       receives and sends will be disallowed.  If the return value is zero you
27       may  continue  using  the  underlying transport layer. GNUTLS_SHUT_RDWR
28       sends an alert containing a close request and waits for the peer to re‐
29       ply with the same message.
30
31       In  case  of GNUTLS_SHUT_WR the TLS session gets terminated and further
32       sends will be disallowed. In order to reuse the connection  you  should
33       wait  for an EOF from the peer.  GNUTLS_SHUT_WR sends an alert contain‐
34       ing 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, and thus  not  distinguishing  be‐
39       tween a malicious party prematurely terminating the connection and nor‐
40       mal termination.
41
42       This function may also return GNUTLS_E_AGAIN  or  GNUTLS_E_INTERRUPTED;
43       cf.  gnutls_record_get_direction().
44

RETURNS

46       GNUTLS_E_SUCCESS  on success, or an error code, see function documenta‐
47       tion for entire semantics.
48

REPORTING BUGS

50       Report bugs to <bugs@gnutls.org>.
51       Home page: https://www.gnutls.org
52
53
55       Copyright © 2001- Free Software Foundation, Inc., and others.
56       Copying and distribution of this file, with  or  without  modification,
57       are  permitted in any medium without royalty provided the copyright no‐
58       tice and this notice are preserved.
59

SEE ALSO

61       The full documentation for gnutls is maintained as  a  Texinfo  manual.
62       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
63       visit
64
65       https://www.gnutls.org/manual/
66
67gnutls                               3.7.2                       gnutls_bye(3)
Impressum