HMAC_CTX_new(), HMAC_CTX_free() are new in OpenSSL 1.1.0.
nvme.c: In function ‘gen_dhchap_key’:
nvme.c:6792:24: error: implicit declaration of function ‘HMAC_CTX_new’; did you mean ‘HMAC_CTX_init’? [-Werror=implicit-function-declaration]
6792 | HMAC_CTX *hmac_ctx = HMAC_CTX_new();
| ^~~~~~~~~~~~
| HMAC_CTX_init
nvme.c:6792:24: error: initialization of ‘HMAC_CTX *’ {aka ‘struct hmac_ctx_st *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
nvme.c:6805:3: error: implicit declaration of function ‘HMAC_CTX_free’; did you mean ‘HMAC_CTX_copy’? [-Werror=implicit-function-declaration]
6805 | HMAC_CTX_free(hmac_ctx);
| ^~~~~~~~~~~~~
| HMAC_CTX_copy
cc1: all warnings being treated as errors
make: *** [Makefile:155: nvme.o] Error 1
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
LIBJSONC_14 = $(shell pkg-config --atleast-version=0.14 json-c; echo $$?)
LIBJSONC = $(shell pkg-config json-c; echo $$?)
LIBZ = $(shell $(LD) -o /dev/null -lz >/dev/null 2>&1; echo $$?)
-LIBOPENSSL = $(shell $(LD) -o /dev/null -lssl >/dev/null 2>&1; echo $$?)
+LIBOPENSSL = $(shell pkg-config --atleast-version=1.1.0 openssl; echo $$?)
NVME = nvme
INSTALL ?= install
DESTDIR =
libz_dep = dependency('zlib', required: true)
# Check for open-ssl availability
-libopenssl = dependency('openssl', required: false)
+libopenssl = dependency('openssl', version: '>=1.1.0', required: false)
conf.set('OPENSSL', libopenssl.found(), description: 'Is open-ssl required?')
# Set the nvme-cli version