|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@deftypefun {int} {gnutls_bye} (gnutls_session_t @var{session}, gnutls_close_request_t @var{how})
|
|
Packit Service |
4684c1 |
@var{session}: is a @code{gnutls_session_t} type.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@var{how}: is an integer
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Terminates the current TLS/SSL connection. The connection should
|
|
Packit Service |
4684c1 |
have been initiated using @code{gnutls_handshake()} . @code{how} should be one
|
|
Packit Service |
4684c1 |
of @code{GNUTLS_SHUT_RDWR} , @code{GNUTLS_SHUT_WR} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
In case of @code{GNUTLS_SHUT_RDWR} the TLS session gets
|
|
Packit Service |
4684c1 |
terminated and further receives and sends will be disallowed. If
|
|
Packit Service |
4684c1 |
the return value is zero you may continue using the underlying
|
|
Packit Service |
4684c1 |
transport layer. @code{GNUTLS_SHUT_RDWR} sends an alert containing a close
|
|
Packit Service |
4684c1 |
request and waits for the peer to reply with the same message.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
In case of @code{GNUTLS_SHUT_WR} the TLS session gets terminated
|
|
Packit Service |
4684c1 |
and further sends will be disallowed. In order to reuse the
|
|
Packit Service |
4684c1 |
connection you should wait for an EOF from the peer.
|
|
Packit Service |
4684c1 |
@code{GNUTLS_SHUT_WR} sends an alert containing a close request.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Note that not all implementations will properly terminate a TLS
|
|
Packit Service |
4684c1 |
connection. Some of them, usually for performance reasons, will
|
|
Packit Service |
4684c1 |
terminate only the underlying transport layer, and thus not
|
|
Packit Service |
4684c1 |
distinguishing between a malicious party prematurely terminating
|
|
Packit Service |
4684c1 |
the connection and normal termination.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This function may also return @code{GNUTLS_E_AGAIN} or
|
|
Packit Service |
4684c1 |
@code{GNUTLS_E_INTERRUPTED} ; cf. @code{gnutls_record_get_direction()} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, or an error code, see
|
|
Packit Service |
4684c1 |
function documentation for entire semantics.
|
|
Packit Service |
4684c1 |
@end deftypefun
|