libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 19db7f74f4f6e37dc645f8363fd1259422a01462
parent e30a3a0a1c7423b435e6cb0a2a065c0ed3ac25be
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 12 Oct 2008 21:00:50 +0000

removed too much

Diffstat:
Msrc/daemon/https/tls/gnutls_handshake.c | 18++++++++++++++++++
Msrc/daemon/https/tls/gnutls_handshake.h | 2++
2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/daemon/https/tls/gnutls_handshake.c b/src/daemon/https/tls/gnutls_handshake.c @@ -145,6 +145,24 @@ resume_copy_required_values (MHD_gtls_session_t session) session->internals.resumed_security_parameters.session_id_size; } +/** + * gnutls_handshake_set_max_packet_length - This function will set the maximum length of a handshake message + * @session: is a #gnutls_session_t structure. + * @max: is the maximum number. + * + * This function will set the maximum size of a handshake message. + * Handshake messages over this size are rejected. + * The default value is 16kb which is large enough. Set this to 0 if you do not want + * to set an upper limit. + * + **/ +void +MHD__gnutls_handshake_set_max_packet_length (MHD_gtls_session_t session, size_t max) +{ + session->internals.max_handshake_data_buffer_size = max; +} + + static void MHD_gtls_set_server_random (MHD_gtls_session_t session, uint8_t * rnd) { diff --git a/src/daemon/https/tls/gnutls_handshake.h b/src/daemon/https/tls/gnutls_handshake.h @@ -36,6 +36,8 @@ int MHD_gtls_recv_hello (MHD_gtls_session_t session, opaque * data, int MHD_gtls_recv_handshake (MHD_gtls_session_t session, uint8_t **, int *, MHD_gnutls_handshake_description_t, Optional optional); +void +MHD__gnutls_handshake_set_max_packet_length (MHD_gtls_session_t session, size_t max); #define STATE session->internals.handshake_state /* This returns true if we have got there