Corrected internal API for TLS backends

This commit is contained in:
Evgeny Grin (Karlson2k)
2024-11-28 22:04:06 +03:00
parent 70b042be40
commit 155895fe45
7 changed files with 23 additions and 8 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
+3 -2
View File
@@ -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
+1 -1
View File
@@ -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);
}
+8 -1
View File
@@ -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
+1 -1
View File
@@ -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);
}
+8 -1
View File
@@ -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