expand test to force OpenSSL

This commit is contained in:
Christian Grothoff
2024-11-29 15:02:11 +01:00
parent c9ced7a52c
commit df09a72007
3 changed files with 40 additions and 0 deletions
+13
View File
@@ -652,6 +652,19 @@ MHDT_server_setup_gnutls (const void *cls,
struct MHD_Daemon *d);
/**
* Initialize MHD daemon with TLS support using OpenSSL, binding to any free
* port.
*
* @param cls closure
* @param[in,out] d daemon to initialize
* @return error message, NULL on success
*/
const char *
MHDT_server_setup_openssl (const void *cls,
struct MHD_Daemon *d);
/**
* Function that runs an MHD daemon until
* a read() against @a finsig succeeds.
@@ -172,6 +172,25 @@ MHDT_server_setup_gnutls (const void *cls,
}
const char *
MHDT_server_setup_openssl (const void *cls,
struct MHD_Daemon *d)
{
const struct MHD_DaemonOptionAndValue *options = cls;
const char *err;
err = MHDT_server_setup_minimal (options,
d);
if (NULL != err)
return err;
err = server_setup_tls (d,
MHD_TLS_BACKEND_OPENSSL);
if (NULL != err)
return err;
return NULL;
}
void
MHDT_server_run_minimal (void *cls,
int finsig,
+8
View File
@@ -157,6 +157,14 @@ main (int argc, char *argv[])
.server_runner = &MHDT_server_run_minimal,
},
#endif
#if MHD_USE_OPENSSL
{
.label = "auto-selected mode, single threaded, forcing OpenSSL",
.server_setup = &MHDT_server_setup_openssl,
.server_setup_cls = thread1auto,
.server_runner = &MHDT_server_run_minimal,
},
#endif
#if 1
/* FIXME: remove once MHD_daemon_process_blocking
has been implemented */