我正在尝试构建MQTT Auth Plugin并面临问题。我已按照@ http://www.yasith.me/2016/04/securing-mqtt-connection-using.html提供的说明执行此操作。这是我得到的错误 -
Using mosquitto source dir: /home/vagrant/Repos/mosquitto/mqtt/mosquitto
OpenSSL install dir: /usr/bin
If you changed the backend selection, you might need to 'make clean' first
CFLAGS: -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include
LDFLAGS: -L/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/
LDADD: -lcurl -L/usr/bin/lib -lcrypto -lmosquitto
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o auth-plug.o auth-plug.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o base64.o base64.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o pbkdf2-check.o pbkdf2-check.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o log.o log.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o envs.o envs.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o hash.o hash.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o be-psk.o be-psk.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o backends.o backends.c
cc -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/src/ -I/home/vagrant/Repos/mosquitto/mqtt/mosquitto/lib/ -fPIC -Wall -Werror -DBE_HTTP -I/src -DDEBUG=1 -I/usr/bin/include -c -o cache.o cache.c
cache.c: In function 'sha_hash':
cache.c:48:3: error: implicit declaration of function 'EVP_MD_CTX_new' [-Werror=implicit-function-declaration]
cache.c:48:23: error: initialization makes pointer from integer without a cast [-Werror]
cache.c:53:3: error: implicit declaration of function 'EVP_MD_CTX_free' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [cache.o] Error 1
我的config.mk文件看起来像 -
# Select your backends from this list
BACKEND_CDB ?= no
BACKEND_MYSQL ?= no
BACKEND_SQLITE ?= no
BACKEND_REDIS ?= no
BACKEND_POSTGRES ?= no
BACKEND_LDAP ?= no
BACKEND_HTTP ?= yes
BACKEND_JWT ?= no
BACKEND_MONGO ?= no
# Specify the path to the Mosquitto sources here
MOSQUITTO_SRC =/home/vagrant/Repos/mosquitto/mqtt/mosquitto
# Specify the path the OpenSSL here
OPENSSLDIR = /usr/bin
# Specify optional/additional linker flags here
LDFLAGS =
我在LINUX VM(流浪汉)上这样做 - 不知道这是否会有所不同。我能够看到所有apt-get按预期安装软件包。
有什么建议吗?
答案 0 :(得分:0)
我认为这取决于您使用的openssl版本。 EVP_MD_CTX_new()
仅适用于openssl 1.1.0。