mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-25 19:40:35 -09:00
package/mosquitto: add option to enable HTTP API on listeners
The mosquitto broker (not the library) can have listeners configured to serve HTTP requests; it can optionally accept (some) HTTP API requests on such listeners. Add a new option to enable the availability of http_pi. Note that we do not just depend on libmicrohttpd to be enabled, because the HTTP API is a security boundary, and enabling it must be an explicit decision. Co-developped-by: Titouan Christophe <titouan.christophe@mind.be> [yann.morin@orange.com: make it an explicit option] Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Titouan Christophe <titouan.christophe@mind.be> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
c5ed4f5223
commit
989214ae3d
@@ -79,15 +79,24 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
|
||||
help
|
||||
Build and install the mosquitto broker onto target.
|
||||
|
||||
if BR2_PACKAGE_MOSQUITTO_BROKER
|
||||
|
||||
config BR2_PACKAGE_MOSQUITTO_BROKER_HTTP_API
|
||||
bool "http_api"
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
help
|
||||
Add support for simple webserver as a listener to serve
|
||||
some of the HTTP API.
|
||||
|
||||
config BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN
|
||||
bool "dynamic security plugin"
|
||||
depends on BR2_PACKAGE_MOSQUITTO_BROKER
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
Build and install the dynamic security plugin for
|
||||
mosquitto broker onto target.
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
comment "mosquitto needs a toolchain w/ dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
@@ -18,8 +18,7 @@ MOSQUITTO_CONF_OPTS = \
|
||||
-DWITH_DOCS=OFF \
|
||||
-DWITH_TESTS=OFF \
|
||||
-DWITH_STATIC_LIBRARIES=OFF \
|
||||
-DWITH_BUNDLED_DEPS=ON \
|
||||
-DWITH_HTTP_API=OFF
|
||||
-DWITH_BUNDLED_DEPS=ON
|
||||
|
||||
# adns uses getaddrinfo_a
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||
@@ -95,6 +94,13 @@ MOSQUITTO_CONF_OPTS += \
|
||||
-DWITH_PLUGIN_PERSIST_SQLITE=OFF \
|
||||
-DWITH_PLUGIN_SPARKPLUG_AWARE=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_HTTP_API),y)
|
||||
MOSQUITTO_DEPENDENCIES += libmicrohttpd
|
||||
MOSQUITTO_CONF_OPTS += -DWITH_HTTP_API=ON
|
||||
else
|
||||
MOSQUITTO_CONF_OPTS += -DWITH_HTTP_API=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN),y)
|
||||
MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_DYNAMIC_SECURITY=ON
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user