mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Corrected internal API for TLS backends
This commit is contained in:
@@ -171,7 +171,7 @@ new_connection_prepare_ (struct MHD_Daemon *restrict daemon,
|
||||
tls_data_size = 0;
|
||||
#ifdef MHD_ENABLE_HTTPS
|
||||
if (mhd_D_HAS_TLS (daemon))
|
||||
tls_data_size = mhd_tls_conn_get_tls_size ();
|
||||
tls_data_size = mhd_tls_conn_get_tls_size (daemon->tls);
|
||||
#endif
|
||||
|
||||
c = mhd_calloc (1, sizeof (struct MHD_Connection) + tls_data_size);
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
(mhd_TLS_GNU_ENABLED + mhd_TLS_OPEN_ENABLED)
|
||||
|
||||
#if mhd_TLS_NUM_BACKENDS == 0
|
||||
#error At least one TLS backend must be enabled is this header is included
|
||||
#error At least one TLS backend must be enabled if this header is included
|
||||
#endif
|
||||
|
||||
#if mhd_TLS_NUM_BACKENDS > 1
|
||||
|
||||
@@ -103,9 +103,10 @@
|
||||
|
||||
/**
|
||||
* Get size size of the connection's TLS settings
|
||||
* @param d_tls the pointer to the daemon's TLS settings
|
||||
*/
|
||||
#define mhd_tls_conn_get_tls_size() \
|
||||
mhd_TLS_FUNC (_conn_get_tls_size)()
|
||||
#define mhd_tls_conn_get_tls_size(d_tls) \
|
||||
mhd_TLS_FUNC (_conn_get_tls_size)(d_tls)
|
||||
|
||||
/**
|
||||
* Initialise connection TLS settings
|
||||
|
||||
@@ -450,7 +450,7 @@ mhd_tls_gnu_daemon_deinit (struct mhd_TlsGnuDaemonData *restrict d_tls)
|
||||
/* ** Connection initialisation / de-initialisation ** */
|
||||
|
||||
MHD_INTERNAL size_t
|
||||
mhd_tls_gnu_conn_get_tls_size (void)
|
||||
mhd_tls_gnu_conn_get_tls_size_v (void)
|
||||
{
|
||||
return sizeof (struct mhd_TlsGnuConnData);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,14 @@ struct mhd_ConnSocket; /* Forward declaration */
|
||||
* Get size size of the connection's TLS settings
|
||||
*/
|
||||
MHD_INTERNAL size_t
|
||||
mhd_tls_gnu_conn_get_tls_size (void);
|
||||
mhd_tls_gnu_conn_get_tls_size_v (void);
|
||||
|
||||
/**
|
||||
* Get size size of the connection's TLS settings
|
||||
* @param d_tls the pointer to the daemon's TLS settings
|
||||
*/
|
||||
#define mhd_tls_gnu_conn_get_tls_size(d_tls) \
|
||||
mhd_tls_gnu_conn_get_tls_size_v ()
|
||||
|
||||
/**
|
||||
* Initialise connection TLS settings
|
||||
|
||||
@@ -796,7 +796,7 @@ mhd_tls_open_daemon_deinit (struct mhd_TlsOpenDaemonData *restrict d_tls)
|
||||
/* ** Connection initialisation / de-initialisation ** */
|
||||
|
||||
MHD_INTERNAL size_t
|
||||
mhd_tls_open_conn_get_tls_size (void)
|
||||
mhd_tls_open_conn_get_tls_size_v (void)
|
||||
{
|
||||
return sizeof (struct mhd_TlsOpenConnData);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,14 @@ struct mhd_ConnSocket; /* Forward declaration */
|
||||
* Get size size of the connection's TLS settings
|
||||
*/
|
||||
MHD_INTERNAL size_t
|
||||
mhd_tls_open_conn_get_tls_size (void);
|
||||
mhd_tls_open_conn_get_tls_size_v (void);
|
||||
|
||||
/**
|
||||
* Get size size of the connection's TLS settings
|
||||
* @param d_tls the pointer to the daemon's TLS settings
|
||||
*/
|
||||
#define mhd_tls_open_conn_get_tls_size(d_tls) \
|
||||
mhd_tls_open_conn_get_tls_size_v ()
|
||||
|
||||
/**
|
||||
* Initialise connection TLS settings
|
||||
|
||||
Reference in New Issue
Block a user