diff --git a/configure.ac b/configure.ac index 9addff7d..d7376e64 100644 --- a/configure.ac +++ b/configure.ac @@ -5278,7 +5278,7 @@ choke me now [MSG_HTTPS="yes (single backend)"] ) AS_IF([test -z "$MSG_TLS_BACKENDS"],[AC_MSG_FAILURE([configure internal error: no TLS backends])]) - AC_DEFINE([MHD_ENABLE_HTTPS],[1],[Define to '1' i][f HTTPS protocol should be enabled]) + AC_DEFINE([MHD_SUPPORT_HTTPS],[1],[Define to '1' i][f HTTPS protocol should be supported]) ], [ AS_VAR_IF([enable_https],["yes"], @@ -5325,7 +5325,7 @@ AC_SUBST([OPENSSL_CPPFLAGS]) AC_SUBST([OPENSSL_LDFLAGS]) AC_SUBST([OPENSSL_LIBS]) AM_CONDITIONAL([MHD_ENABLE_MULTITLS], [test "x$multiple_tls" = "xyes"]) -AM_CONDITIONAL([MHD_ENABLE_HTTPS], [test "x$enable_https" = "xyes"]) +AM_CONDITIONAL([MHD_SUPPORT_HTTPS], [test "x$enable_https" = "xyes"]) AS_VAR_IF([have_gnutls], ["yes"], [ diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 8226dfc2..a0c7a4d9 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -28,7 +28,7 @@ noinst_PROGRAMS = \ if MHD_SUPPORT_AUTH_BASIC noinst_PROGRAMS += \ basicauthentication -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS noinst_PROGRAMS += \ tlsauthentication endif diff --git a/src/mhd2/Makefile.am b/src/mhd2/Makefile.am index bd05fb7f..5855b6f2 100644 --- a/src/mhd2/Makefile.am +++ b/src/mhd2/Makefile.am @@ -195,7 +195,7 @@ if MHD_SUPPORT_UPGRADE libmicrohttpd2_la_SOURCES += $(upgrade_OPTSOURCES) endif -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS libmicrohttpd2_la_SOURCES += $(tls_common_OPTSOURCES) if MHD_ENABLE_MULTITLS diff --git a/src/mhd2/conn_data_process.c b/src/mhd2/conn_data_process.c index 6657c310..651141e4 100644 --- a/src/mhd2/conn_data_process.c +++ b/src/mhd2/conn_data_process.c @@ -47,9 +47,9 @@ #include "conn_data_send.h" #include "stream_process_states.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "conn_tls_check.h" -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ bool mhd_conn_process_recv_send_data (struct MHD_Connection *restrict c) @@ -58,7 +58,7 @@ mhd_conn_process_recv_send_data (struct MHD_Connection *restrict c) bool has_sock_err; bool data_processed; -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (c)) { switch (mhd_conn_tls_check (c)) @@ -75,7 +75,7 @@ mhd_conn_process_recv_send_data (struct MHD_Connection *restrict c) break; } } -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ /* The "send-ready" state is known if system polling call is edge-triggered (it always checks for both send- and recv-ready) or if connection needs diff --git a/src/mhd2/daemon_add_conn.c b/src/mhd2/daemon_add_conn.c index 817326e6..e2a9e286 100644 --- a/src/mhd2/daemon_add_conn.c +++ b/src/mhd2/daemon_add_conn.c @@ -67,7 +67,7 @@ #include "response_destroy.h" #include "conn_mark_ready.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_funcs.h" #endif @@ -169,7 +169,7 @@ new_connection_prepare_ (struct MHD_Daemon *restrict daemon, *conn_out = NULL; tls_data_size = 0; -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_D_HAS_TLS (daemon)) tls_data_size = mhd_tls_conn_get_tls_size (daemon->tls); #endif @@ -184,7 +184,7 @@ new_connection_prepare_ (struct MHD_Daemon *restrict daemon, } else { -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (0 != tls_data_size) c->tls = (struct mhd_TlsConnData *) (c + 1); # ifndef HAVE_NULL_PTR_ALL_ZEROS @@ -421,7 +421,7 @@ new_connection_process_ (struct MHD_Daemon *restrict daemon, } /* Free resources allocated before the call of this functions */ -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (connection)) mhd_tls_conn_deinit (connection->tls); #endif @@ -1041,7 +1041,7 @@ mhd_conn_close_final (struct MHD_Connection *restrict c) mhd_assert (c != mhd_DLINKEDL_GET_FIRST (&(c->daemon->conns), all_conn)); mhd_assert (c != mhd_DLINKEDL_GET_LAST (&(c->daemon->conns), all_conn)); -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (c)) { mhd_assert (mhd_D_HAS_TLS (c->daemon)); diff --git a/src/mhd2/daemon_start.c b/src/mhd2/daemon_start.c index d2d4db8c..36f17806 100644 --- a/src/mhd2/daemon_start.c +++ b/src/mhd2/daemon_start.c @@ -75,7 +75,7 @@ #include "mhd_lib_init.h" #include "daemon_logger.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_funcs.h" #endif @@ -1244,11 +1244,11 @@ daemon_choose_and_preinit_events (struct MHD_Daemon *restrict d, #ifdef MHD_SUPPORT_EPOLL bool edge_trig_allowed; edge_trig_allowed = true; -# ifdef MHD_ENABLE_HTTPS +# ifdef MHD_SUPPORT_HTTPS if ((edge_trig_allowed) && (MHD_TLS_BACKEND_NONE != s->tls)) edge_trig_allowed = mhd_tls_is_edge_trigg_supported (s); -# endif /* MHD_ENABLE_HTTPS */ +# endif /* MHD_SUPPORT_HTTPS */ #endif /* MHD_SUPPORT_EPOLL */ fallback_syscall_allowed = true; @@ -1621,7 +1621,7 @@ daemon_init_tls (struct MHD_Daemon *restrict d, mhd_StatusCodeInt ret; mhd_assert (! d->dbg.tls_inited); -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS d->tls = NULL; #endif @@ -1632,12 +1632,12 @@ daemon_init_tls (struct MHD_Daemon *restrict d, #endif return MHD_SC_OK; } -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS mhd_LOG_MSG (d, \ MHD_SC_TLS_DISABLED, \ "HTTPS is not supported by this MHD build"); return MHD_SC_TLS_DISABLED; -#else /* MHD_ENABLE_HTTPS */ +#else /* MHD_SUPPORT_HTTPS */ if (1) { enum mhd_TlsBackendAvailable tls_avail; @@ -1669,7 +1669,7 @@ daemon_init_tls (struct MHD_Daemon *restrict d, d->dbg.tls_inited = (MHD_SC_OK == ret); #endif return (enum MHD_StatusCode) ret; -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ } @@ -1681,7 +1681,7 @@ MHD_FN_PAR_NONNULL_ (1) static void daemon_deinit_tls (struct MHD_Daemon *restrict d) { mhd_assert (d->dbg.tls_inited); -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (NULL != d->tls) mhd_tls_daemon_deinit (d->tls); #endif diff --git a/src/mhd2/lib_get_info.c b/src/mhd2/lib_get_info.c index ed4081f3..537deb74 100644 --- a/src/mhd2/lib_get_info.c +++ b/src/mhd2/lib_get_info.c @@ -47,7 +47,7 @@ # include "mhd_str.h" #endif -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_choice.h" /* Include all supported TLS backends headers */ # if defined(MHD_SUPPORT_GNUTLS) @@ -406,7 +406,7 @@ MHD_lib_get_info_fixed_sz (enum MHD_LibInfoFixed info_type, case MHD_LIB_INFO_FIXED_HAS_TLS_KEY_PASSWORD: /* Both backends have support */ if (sizeof(output_buf->v_tls) <= output_buf_size) { -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS output_buf->v_tls.tls_supported = MHD_NO; output_buf->v_tls.backend_gnutls = MHD_NO; output_buf->v_tls.backend_openssl = MHD_NO; @@ -459,7 +459,7 @@ MHD_lib_get_info_dynamic_sz (enum MHD_LibInfoDynamic info_type, case MHD_LIB_INFO_DYNAMIC_TYPE_TLS: if (sizeof(output_buf->v_tls) <= output_buf_size) { -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS output_buf->v_tls.tls_supported = MHD_NO; output_buf->v_tls.backend_gnutls = MHD_NO; output_buf->v_tls.backend_openssl = MHD_NO; diff --git a/src/mhd2/mhd_connection.h b/src/mhd2/mhd_connection.h index a0dadf80..75c45278 100644 --- a/src/mhd2/mhd_connection.h +++ b/src/mhd2/mhd_connection.h @@ -56,7 +56,7 @@ #include "mhd_public_api.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_choice.h" /* For the TLS struct forward declaration */ #endif @@ -160,7 +160,7 @@ enum MHD_FIXED_ENUM_ mhd_ConnState mhd_CONN_STATE_CLOSED = mhd_CONN_FLAG_CLOSED }; -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * The status of TLS buffer for incoming (receive) data */ @@ -176,7 +176,7 @@ enum mhd_TlsBufDataIn */ mhd_TLS_BUF_HAS_DATA_IN = mhd_SOCKET_NET_STATE_RECV_READY }; -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ /** @@ -505,7 +505,7 @@ struct MHD_Connection */ struct mhd_ConnSocket sk; -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * Connection-specific TLS data. * NULL if TLS is not used (plain HTTP connection). @@ -523,7 +523,7 @@ struct MHD_Connection * Status of TLS buffer for the incoming data */ enum mhd_TlsBufDataIn tls_has_data_in; -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ /** * 'true' if connection is in 'process ready' list, @@ -721,32 +721,32 @@ struct MHD_Connection #endif }; -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * Returns non-zero if connection has TLS enabled or zero otherwise */ # define mhd_C_HAS_TLS(c) (((c)->tls) ? (! 0) : (0)) -#else /* ! MHD_ENABLE_HTTPS */ +#else /* ! MHD_SUPPORT_HTTPS */ /** * Returns non-zero if connection has TLS enabled or zero otherwise */ # define mhd_C_HAS_TLS(c) (0) -#endif /* ! MHD_ENABLE_HTTPS */ +#endif /* ! MHD_SUPPORT_HTTPS */ -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * Returns #mhd_SOCKET_NET_STATE_RECV_READY if connection has incoming data * pending in TLS buffers */ # define mhd_C_HAS_TLS_DATA_IN(c) \ (((c)->tls) ? ((unsigned int) ((c)->tls_has_data_in)) : (0u)) -#else /* ! MHD_ENABLE_HTTPS */ +#else /* ! MHD_SUPPORT_HTTPS */ /** * Returns #mhd_SOCKET_NET_STATE_RECV_READY if connection has incoming data * pending in TLS buffers */ # define mhd_C_HAS_TLS_DATA_IN(c) (0) -#endif /* ! MHD_ENABLE_HTTPS */ +#endif /* ! MHD_SUPPORT_HTTPS */ #endif /* ! MHD_CONNECTION_H */ diff --git a/src/mhd2/mhd_daemon.h b/src/mhd2/mhd_daemon.h index d49a1350..8f7777ad 100644 --- a/src/mhd2/mhd_daemon.h +++ b/src/mhd2/mhd_daemon.h @@ -42,7 +42,7 @@ # include "mhd_digest_auth_data.h" #endif -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_choice.h" #endif @@ -1029,7 +1029,7 @@ struct MHD_Daemon struct mhd_DaemonAuthDigestData auth_dg; #endif /* MHD_SUPPORT_AUTH_DIGEST */ -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * The pointer to the daemon TLS data. * If set to non-NULL then HTTPS protocol is used, if set to NULL then @@ -1134,7 +1134,7 @@ struct MHD_Daemon (mhd_D_IS_USING_EPOLL (d) || \ (mhd_WM_INT_EXTERNAL_EVENTS_EDGE ==((d)->wmode_int))) -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS /** * Returns non-zero if daemon has TLS enabled or zero otherwise */ diff --git a/src/mhd2/mhd_recv.c b/src/mhd2/mhd_recv.c index 7b654702..a23da765 100644 --- a/src/mhd2/mhd_recv.c +++ b/src/mhd2/mhd_recv.c @@ -39,7 +39,7 @@ #include "mhd_assert.h" #include "mhd_socket_error_funcs.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_funcs.h" #endif @@ -81,7 +81,7 @@ mhd_recv_plain (struct MHD_Connection *restrict c, } -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS static MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_OUT_SIZE_ (3,2) MHD_FN_PAR_OUT_ (4) enum mhd_SocketError @@ -124,7 +124,7 @@ mhd_recv_tls (struct MHD_Connection *restrict c, } -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_OUT_SIZE_ (3,2) MHD_FN_PAR_OUT_ (4) enum mhd_SocketError @@ -136,13 +136,13 @@ mhd_recv (struct MHD_Connection *restrict c, mhd_assert (MHD_INVALID_SOCKET != c->sk.fd); mhd_assert (mhd_HTTP_STAGE_CLOSED != c->stage); -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (c)) return mhd_recv_tls (c, buf_size, buf, received); -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ return mhd_recv_plain (c, buf_size, buf, received); } diff --git a/src/mhd2/mhd_send.c b/src/mhd2/mhd_send.c index c8d073a7..67b289a6 100644 --- a/src/mhd2/mhd_send.c +++ b/src/mhd2/mhd_send.c @@ -71,7 +71,7 @@ #include "mhd_limits.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_funcs.h" #endif @@ -823,7 +823,7 @@ mhd_send_plain (struct MHD_Connection *restrict c, } -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS static MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (3,2) @@ -867,7 +867,7 @@ mhd_send_tls (struct MHD_Connection *restrict c, } -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (3,2) @@ -881,14 +881,14 @@ mhd_send_data (struct MHD_Connection *restrict connection, mhd_assert (MHD_INVALID_SOCKET != connection->sk.fd); mhd_assert (mhd_HTTP_STAGE_CLOSED != connection->stage); -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (connection)) return mhd_send_tls (connection, buf_size, buf, push_data, sent); -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ return mhd_send_plain (connection, buf_size, @@ -1536,7 +1536,7 @@ send_iov_nontls (struct MHD_Connection *restrict connection, #endif /* mhd_USE_VECT_SEND */ -#if ! defined(mhd_USE_VECT_SEND) || defined(MHD_ENABLE_HTTPS) || \ +#if ! defined(mhd_USE_VECT_SEND) || defined(MHD_SUPPORT_HTTPS) || \ defined(mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED) @@ -1618,7 +1618,7 @@ send_iov_emu (struct MHD_Connection *restrict connection, } -#endif /* !mhd_USE_VECT_SEND || MHD_ENABLE_HTTPS +#endif /* !mhd_USE_VECT_SEND || MHD_SUPPORT_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ @@ -1629,10 +1629,10 @@ mhd_send_iovec (struct MHD_Connection *restrict connection, size_t *restrict sent) { #ifdef mhd_USE_VECT_SEND -#if defined(MHD_ENABLE_HTTPS) || \ +#if defined(MHD_SUPPORT_HTTPS) || \ defined(mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED) bool use_iov_send = true; -#endif /* MHD_ENABLE_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ +#endif /* MHD_SUPPORT_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ #endif /* mhd_USE_VECT_SEND */ mhd_assert (NULL != connection->rp.resp_iov.iov); @@ -1640,7 +1640,7 @@ mhd_send_iovec (struct MHD_Connection *restrict connection, connection->rp.response->cntn_dtype); mhd_assert (connection->rp.resp_iov.cnt > connection->rp.resp_iov.sent); #ifdef mhd_USE_VECT_SEND -#if defined(MHD_ENABLE_HTTPS) || \ +#if defined(MHD_SUPPORT_HTTPS) || \ defined(mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED) use_iov_send = use_iov_send && (! mhd_C_HAS_TLS (connection)); @@ -1649,13 +1649,13 @@ mhd_send_iovec (struct MHD_Connection *restrict connection, connection->sk.props.has_spipe_supp); #endif /* mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ if (use_iov_send) -#endif /* MHD_ENABLE_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ +#endif /* MHD_SUPPORT_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ return send_iov_nontls (connection, r_iov, push_data, sent); #endif /* mhd_USE_VECT_SEND */ -#if ! defined(mhd_USE_VECT_SEND) || defined(MHD_ENABLE_HTTPS) || \ +#if ! defined(mhd_USE_VECT_SEND) || defined(MHD_SUPPORT_HTTPS) || \ defined(mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED) return send_iov_emu (connection, r_iov, push_data, sent); -#endif /* !mhd_USE_VECT_SEND || MHD_ENABLE_HTTPS +#endif /* !mhd_USE_VECT_SEND || MHD_SUPPORT_HTTPS || mhd_VECT_SEND_NEEDS_SPIPE_SUPPRESSED */ } diff --git a/src/mhd2/mhd_tls_choice.h b/src/mhd2/mhd_tls_choice.h index d59b217b..26c9c202 100644 --- a/src/mhd2/mhd_tls_choice.h +++ b/src/mhd2/mhd_tls_choice.h @@ -29,7 +29,7 @@ #include "mhd_sys_options.h" -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS #error This header should be used only if HTTPS is enabled #endif diff --git a/src/mhd2/mhd_tls_enums.h b/src/mhd2/mhd_tls_enums.h index 6328917c..869edeb7 100644 --- a/src/mhd2/mhd_tls_enums.h +++ b/src/mhd2/mhd_tls_enums.h @@ -29,7 +29,7 @@ #include "mhd_sys_options.h" -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS #error This header should be used only if HTTPS is enabled #endif diff --git a/src/mhd2/mhd_tls_funcs.h b/src/mhd2/mhd_tls_funcs.h index afe074d2..09cf9008 100644 --- a/src/mhd2/mhd_tls_funcs.h +++ b/src/mhd2/mhd_tls_funcs.h @@ -33,7 +33,7 @@ #include "sys_bool_type.h" #include "mhd_tls_choice.h" -#ifndef MHD_ENABLE_HTTPS +#ifndef MHD_SUPPORT_HTTPS #error This header should be used only if HTTPS is enabled #endif diff --git a/src/mhd2/stream_funcs.c b/src/mhd2/stream_funcs.c index 2c4cd983..3155b4d6 100644 --- a/src/mhd2/stream_funcs.c +++ b/src/mhd2/stream_funcs.c @@ -54,7 +54,7 @@ #include "conn_mark_ready.h" #include "stream_process_reply.h" -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS # include "mhd_tls_funcs.h" #endif @@ -861,7 +861,7 @@ mhd_conn_start_closing (struct MHD_Connection *restrict c, use_graceful_closing = ! c->sk.state.rmt_shut_wr; if (use_graceful_closing) { -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS if (mhd_C_HAS_TLS (c)) { if ((0 != (((unsigned int) c->sk.ready) @@ -871,7 +871,7 @@ mhd_conn_start_closing (struct MHD_Connection *restrict c, (mhd_TLS_PROCED_FAILED != mhd_tls_conn_shutdown (c->tls)); } else -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ if (1) { use_graceful_closing = mhd_socket_shut_wr (c->sk.fd); diff --git a/src/mhd2/stream_process_states.c b/src/mhd2/stream_process_states.c index e5e13f16..eca0afad 100644 --- a/src/mhd2/stream_process_states.c +++ b/src/mhd2/stream_process_states.c @@ -58,12 +58,12 @@ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ void mhd_conn_event_loop_state_update (struct MHD_Connection *restrict c) { -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS mhd_assert (! mhd_C_HAS_TLS (c) || \ (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state)); mhd_assert (mhd_C_HAS_TLS (c) || \ (mhd_CONN_STATE_TCP_CONNECTED == c->conn_state)); -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ switch (c->stage) { @@ -280,12 +280,12 @@ mhd_conn_process_data (struct MHD_Connection *restrict c) while (! c->suspended) { -#ifdef MHD_ENABLE_HTTPS +#ifdef MHD_SUPPORT_HTTPS mhd_assert (! mhd_C_HAS_TLS (c) || \ (mhd_CONN_STATE_TLS_CONNECTED == c->conn_state)); mhd_assert (mhd_C_HAS_TLS (c) || \ (mhd_CONN_STATE_TCP_CONNECTED == c->conn_state)); -#endif /* MHD_ENABLE_HTTPS */ +#endif /* MHD_SUPPORT_HTTPS */ switch (c->stage) { case mhd_HTTP_STAGE_INIT: diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am index 39dba6e5..b5876a9e 100644 --- a/src/microhttpd/Makefile.am +++ b/src/microhttpd/Makefile.am @@ -208,7 +208,7 @@ libmicrohttpd_la_SOURCES += \ basicauth.c basicauth.h endif -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS libmicrohttpd_la_SOURCES += \ connection_https.c connection_https.h endif @@ -261,7 +261,7 @@ if HAVE_POSIX_THREADS if MHD_SUPPORT_UPGRADE if USE_THREADS check_PROGRAMS += test_upgrade test_upgrade_large test_upgrade_vlarge -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS if USE_UPGRADE_TLS_TESTS check_PROGRAMS += test_upgrade_tls test_upgrade_large_tls test_upgrade_vlarge_tls endif diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am index b81bc4c7..26738971 100644 --- a/src/testcurl/Makefile.am +++ b/src/testcurl/Makefile.am @@ -21,7 +21,7 @@ if USE_COVERAGE AM_CFLAGS += -fprofile-arcs -ftest-coverage endif -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS SUBDIRS += https endif diff --git a/src/tests/client_server/Makefile.am b/src/tests/client_server/Makefile.am index 4b7ab3cf..b430617f 100644 --- a/src/tests/client_server/Makefile.am +++ b/src/tests/client_server/Makefile.am @@ -29,7 +29,7 @@ check_PROGRAMS = \ test_authentication \ test_postprocessor -if MHD_ENABLE_HTTPS +if MHD_SUPPORT_HTTPS check_PROGRAMS += \ test_tls \ test_cert_tls