1gnutls_rehandshake(3)               gnutls               gnutls_rehandshake(3)
2
3
4

NAME

6       gnutls_rehandshake - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_rehandshake(gnutls_session_t session);
12

ARGUMENTS

14       gnutls_session_t session
15                   is a gnutls_session_t type.
16

DESCRIPTION

18       This  function  can  only be called in server side, and instructs a TLS
19       1.2 or earlier client to renegotiate parameters (perform a  handshake),
20       by sending a hello request message.
21
22       If   this  function  succeeds,  the  calling  application  should  call
23       gnutls_record_recv() until GNUTLS_E_REHANDSHAKE is  returned  to  clear
24       any  pending  data. If the GNUTLS_E_REHANDSHAKE error code is not seen,
25       then the handshake request was not followed by the peer (the TLS proto‐
26       col  does  not  require the client to do, and such compliance should be
27       handled by the application protocol).
28
29       Once the GNUTLS_E_REHANDSHAKE error code is seen, the calling  applica‐
30       tion  should proceed to calling gnutls_handshake() to negotiate the new
31       parameters.
32
33       If the client does not wish to renegotiate parameters he may reply with
34       an  alert  message, and in that case the return code seen by subsequent
35       gnutls_record_recv() will be GNUTLS_E_WARNING_ALERT_RECEIVED  with  the
36       specific  alert  being  GNUTLS_A_NO_RENEGOTIATION.   A  client may also
37       choose to ignore this request.
38
39       Under TLS 1.3 this function  is  equivalent  to  gnutls_session_key_up‐
40       date()  with  the GNUTLS_KU_PEER flag. In that case subsequent calls to
41       gnutls_record_recv() will not return GNUTLS_E_REHANDSHAKE, and calls to
42       gnutls_handshake() in server side are a no-op.
43
44       This function always fails with GNUTLS_E_INVALID_REQUEST when called in
45       client side.
46

RETURNS

48       GNUTLS_E_SUCCESS on success, otherwise a negative error code.
49

REPORTING BUGS

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

SEE ALSO

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