|
Packit Service |
4684c1 |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
|
|
Packit Service |
4684c1 |
.TH "gnutls_handshake_set_hook_function" 3 "3.6.14" "gnutls" "gnutls"
|
|
Packit Service |
4684c1 |
.SH NAME
|
|
Packit Service |
4684c1 |
gnutls_handshake_set_hook_function \- API function
|
|
Packit Service |
4684c1 |
.SH SYNOPSIS
|
|
Packit Service |
4684c1 |
.B #include <gnutls/gnutls.h>
|
|
Packit Service |
4684c1 |
.sp
|
|
Packit Service |
4684c1 |
.BI "void gnutls_handshake_set_hook_function(gnutls_session_t " session ", unsigned int " htype ", int " when ", gnutls_handshake_hook_func " func ");"
|
|
Packit Service |
4684c1 |
.SH ARGUMENTS
|
|
Packit Service |
4684c1 |
.IP "gnutls_session_t session" 12
|
|
Packit Service |
4684c1 |
is a \fBgnutls_session_t\fP type
|
|
Packit Service |
4684c1 |
.IP "unsigned int htype" 12
|
|
Packit Service |
4684c1 |
the \fBgnutls_handshake_description_t\fP of the message to hook at
|
|
Packit Service |
4684c1 |
.IP "int when" 12
|
|
Packit Service |
4684c1 |
\fBGNUTLS_HOOK_\fP* depending on when the hook function should be called
|
|
Packit Service |
4684c1 |
.IP "gnutls_handshake_hook_func func" 12
|
|
Packit Service |
4684c1 |
is the function to be called
|
|
Packit Service |
4684c1 |
.SH "DESCRIPTION"
|
|
Packit Service |
4684c1 |
This function will set a callback to be called after or before the specified
|
|
Packit Service |
4684c1 |
handshake message has been received or generated. This is a
|
|
Packit Service |
4684c1 |
generalization of \fBgnutls_handshake_set_post_client_hello_function()\fP.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
To call the hook function prior to the message being generated or processed
|
|
Packit Service |
4684c1 |
use \fBGNUTLS_HOOK_PRE\fP as \fIwhen\fP parameter, \fBGNUTLS_HOOK_POST\fP to call
|
|
Packit Service |
4684c1 |
after, and \fBGNUTLS_HOOK_BOTH\fP for both cases.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This callback must return 0 on success or a gnutls error code to
|
|
Packit Service |
4684c1 |
terminate the handshake.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
To hook at all handshake messages use an \fIhtype\fP of \fBGNUTLS_HANDSHAKE_ANY\fP.
|
|
Packit Service |
4684c1 |
.SH "WARNING"
|
|
Packit Service |
4684c1 |
You should not use this function to terminate the
|
|
Packit Service |
4684c1 |
handshake based on client input unless you know what you are
|
|
Packit Service |
4684c1 |
doing. Before the handshake is finished there is no way to know if
|
|
Packit Service |
4684c1 |
there is a man\-in\-the\-middle attack being performed.
|
|
Packit Service |
4684c1 |
.SH "REPORTING BUGS"
|
|
Packit Service |
4684c1 |
Report bugs to <bugs@gnutls.org>.
|
|
Packit Service |
4684c1 |
.br
|
|
Packit Service |
4684c1 |
Home page: https://www.gnutls.org
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
.SH COPYRIGHT
|
|
Packit Service |
4684c1 |
Copyright \(co 2001- Free Software Foundation, Inc., and others.
|
|
Packit Service |
4684c1 |
.br
|
|
Packit Service |
4684c1 |
Copying and distribution of this file, with or without modification,
|
|
Packit Service |
4684c1 |
are permitted in any medium without royalty provided the copyright
|
|
Packit Service |
4684c1 |
notice and this notice are preserved.
|
|
Packit Service |
4684c1 |
.SH "SEE ALSO"
|
|
Packit Service |
4684c1 |
The full documentation for
|
|
Packit Service |
4684c1 |
.B gnutls
|
|
Packit Service |
4684c1 |
is maintained as a Texinfo manual.
|
|
Packit Service |
4684c1 |
If the /usr/share/doc/gnutls/
|
|
Packit Service |
4684c1 |
directory does not contain the HTML form visit
|
|
Packit Service |
4684c1 |
.B
|
|
Packit Service |
4684c1 |
.IP https://www.gnutls.org/manual/
|
|
Packit Service |
4684c1 |
.PP
|