Closed DanaLanza closed 6 months ago
Am Montag, 29. April 2024, 17:55:35 MESZ schrieb DanaLanza:
Hi DanaLanza,
Hello,
I am encountering the error below after I use the command 'make openssl'. I commented out "ACVP_DEFINE_CONSTRUCTOR(openssl_kdf_ssh_backend)" and all the unused functions, but the error persists (I followed the thread: https://github.com/smuellerDD/acvpparser/issues/56). I would greatly appreciate your help. Thank you.
/*
-> undef?
OpenSSL Version: 1.1.1 (FIPS Enabled with Ubuntu Pro) Ubuntu: 18.04.6 LTS
Error: ~/src/acvpparser$ make openssl cc -Wextra -Wall -pedantic -fPIE -O2 -Wno-long-long -Werror -DACVP_PARSER_IUT=\"openssl\" -g -std=c11 -Wno-variadic-macros -DUBUNTU -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fwrapv --param ssp-buffer-size=4 -Iparser -c -o backends/backend_openssl.o backends/backend_openssl.c backends/backend_openssl.c: In function ‘openssl_kdf108’: backends/backend_openssl.c:1582:8: error: implicit declaration of function ‘EVP_KDF_CTX_new_id’; did you mean ‘EVP_PKEY_CTX_new_id’? [-Werror=implicit-function-declaration] ctx = EVP_KDF_CTX_new_id(EVP_KDF_KB); ^
~~~~~ EVP_PKEY_CTX_new_id backends/backend_openssl.c:1582:27: error: ‘EVP_KDF_KB’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTX’? ctx = EVP_KDF_CTX_new_id(EVP_KDF_KB); ^~~~~~ EVP_KDF_CTX backends/backend_openssl.c:1582:27: note: each undeclared identifier is reported only once for each function it appears in In file included from backends/backend_openssl.c:23:0: backends/backend_openssl.c:1588:14: error: implicit declaration of function ‘EVP_KDF_ctrl’; did you mean ‘EVP_sm4_ctr’? [-Werror=implicit-function-declaration] CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MODE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1588:32: error: ‘EVP_KDF_CTRL_SET_KB_MODE’ undeclared (first use in this function); did you mean ‘EVP_PKEY_CTRL_EC_KDF_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MODE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1590:6: error: ‘EVP_KDF_KB_MODE_COUNTER’ undeclared (first use in this function); did you mean ‘ACVP_KDF_108_COUNTER’? EVP_KDF_KB_MODE_COUNTER : ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1591:6: error: ‘EVP_KDF_KB_MODE_FEEDBACK’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MODE_COUNTER’? EVP_KDF_KB_MODE_FEEDBACK), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1599:33: error: ‘EVP_KDF_CTRL_SET_MD’ undeclared (first use in this function); did you mean ‘EVP_PKEY_CTRL_GET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_MD, md), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1601:33: error: ‘EVP_KDF_CTRL_SET_KB_MAC_TYPE’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_MODE’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MAC_TYPE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1602:7: error: ‘EVP_KDF_KB_MAC_TYPE_HMAC’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MODE_FEEDBACK’? EVP_KDF_KB_MAC_TYPE_HMAC), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1609:33: error: ‘EVP_KDF_CTRL_SET_CIPHER’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_CIPHER, type), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1612:7: error: ‘EVP_KDF_KB_MAC_TYPE_CMAC’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MAC_TYPE_HMAC’? EVP_KDF_KB_MAC_TYPE_CMAC), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1617:32: error: ‘EVP_KDF_CTRL_SET_KEY’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KEY, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1666:32: error: ‘EVP_KDF_CTRL_SET_SALT’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KEY’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_SALT, label.buf, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1671:32: error: ‘EVP_KDF_CTRL_SET_KB_INFO’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_MODE’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_INFO, context.buf, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1678:33: error: ‘EVP_KDF_CTRL_SET_KB_SEED’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_INFO’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_SEED, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1359:52: error: passing argument 3 of ‘EVP_PKEY_derive’ from incompatible pointer type [-Werror=incompatible-pointer-types] # define EVP_KDF_DERIVE(a,b,c) EVP_PKEY_derive(a,b,&c) ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1684:14: note: in expansion of macro ‘EVP_KDF_DERIVE’ CKINT_O_LOG(EVP_KDF_DERIVE(ctx, data->derived_key.buf, ^~~~~~ In file included from /usr/include/openssl/cmac.h:19:0, from backends/backend_openssl_common.h:35, from backends/backend_openssl.c:23: /usr/include/openssl/evp.h:1406:5: note: expected ‘size_t {aka long unsigned int }’ but argument is of type ‘uint32_t {aka unsigned int }’ int EVP_PKEY_derive(EVP_PKEY_CTX ctx, unsigned char key, size_t *keylen); ^~~~~~~ backends/backend_openssl.c:1691:2: error: implicit declaration of function ‘EVP_KDF_CTX_free’; did you mean ‘EVP_MD_CTX_free’? [-Werror=implicit-function-declaration] EVP_KDF_CTX_free(ctx); ^~~~EVP_MD_CTX_free cc1: all warnings being treated as errors: recipe for target 'backends/backend_openssl.o' failed make: *** [backends/backend_openssl.o] Error 1
Ciao Stephan
Thank you so much Stephan!! That solved the error.
Hello,
I am encountering the error below after I use the command 'make openssl'. I commented out "ACVP_DEFINE_CONSTRUCTOR(openssl_kdf_ssh_backend)" and all the unused functions, but the error persists (I followed the thread: https://github.com/smuellerDD/acvpparser/issues/56). I would greatly appreciate your help. Thank you.
OpenSSL Version: 1.1.1 (FIPS Enabled with Ubuntu Pro) Ubuntu: 18.04.6 LTS
Error: ~/src/acvpparser$ make openssl cc -Wextra -Wall -pedantic -fPIE -O2 -Wno-long-long -Werror -DACVP_PARSER_IUT=\"openssl\" -g -std=c11 -Wno-variadic-macros -DUBUNTU -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fwrapv --param ssp-buffer-size=4 -Iparser -c -o backends/backend_openssl.o backends/backend_openssl.c backends/backend_openssl.c: In function ‘openssl_kdf108’: backends/backend_openssl.c:1582:8: error: implicit declaration of function ‘EVP_KDF_CTX_new_id’; did you mean ‘EVP_PKEY_CTX_new_id’? [-Werror=implicit-function-declaration] ctx = EVP_KDF_CTX_new_id(EVP_KDF_KB); ^
~~~~~ EVP_PKEY_CTX_new_id backends/backend_openssl.c:1582:27: error: ‘EVP_KDF_KB’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTX’? ctx = EVP_KDF_CTX_new_id(EVP_KDF_KB); ^~~~~~ EVP_KDF_CTX backends/backend_openssl.c:1582:27: note: each undeclared identifier is reported only once for each function it appears in In file included from backends/backend_openssl.c:23:0: backends/backend_openssl.c:1588:14: error: implicit declaration of function ‘EVP_KDF_ctrl’; did you mean ‘EVP_sm4_ctr’? [-Werror=implicit-function-declaration] CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MODE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1588:32: error: ‘EVP_KDF_CTRL_SET_KB_MODE’ undeclared (first use in this function); did you mean ‘EVP_PKEY_CTRL_EC_KDF_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MODE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1590:6: error: ‘EVP_KDF_KB_MODE_COUNTER’ undeclared (first use in this function); did you mean ‘ACVP_KDF_108_COUNTER’? EVP_KDF_KB_MODE_COUNTER : ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1591:6: error: ‘EVP_KDF_KB_MODE_FEEDBACK’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MODE_COUNTER’? EVP_KDF_KB_MODE_FEEDBACK), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1599:33: error: ‘EVP_KDF_CTRL_SET_MD’ undeclared (first use in this function); did you mean ‘EVP_PKEY_CTRL_GET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_MD, md), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1601:33: error: ‘EVP_KDF_CTRL_SET_KB_MAC_TYPE’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_MODE’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MAC_TYPE, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1602:7: error: ‘EVP_KDF_KB_MAC_TYPE_HMAC’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MODE_FEEDBACK’? EVP_KDF_KB_MAC_TYPE_HMAC), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1609:33: error: ‘EVP_KDF_CTRL_SET_CIPHER’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_CIPHER, type), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1612:7: error: ‘EVP_KDF_KB_MAC_TYPE_CMAC’ undeclared (first use in this function); did you mean ‘EVP_KDF_KB_MAC_TYPE_HMAC’? EVP_KDF_KB_MAC_TYPE_CMAC), ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1617:32: error: ‘EVP_KDF_CTRL_SET_KEY’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_MD’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KEY, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1666:32: error: ‘EVP_KDF_CTRL_SET_SALT’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KEY’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_SALT, label.buf, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1671:32: error: ‘EVP_KDF_CTRL_SET_KB_INFO’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_MODE’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_INFO, context.buf, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1678:33: error: ‘EVP_KDF_CTRL_SET_KB_SEED’ undeclared (first use in this function); did you mean ‘EVP_KDF_CTRL_SET_KB_INFO’? CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_SEED, ^ backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1359:52: error: passing argument 3 of ‘EVP_PKEY_derive’ from incompatible pointer type [-Werror=incompatible-pointer-types]define EVP_KDF_DERIVE(a,b,c) EVP_PKEY_derive(a,b,&c)
backends/backend_openssl_common.h:88:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:1684:14: note: in expansion of macro ‘EVP_KDF_DERIVE’ CKINT_O_LOG(EVP_KDF_DERIVE(ctx, data->derived_key.buf, ^
~~~~~ In file included from /usr/include/openssl/cmac.h:19:0, from backends/backend_openssl_common.h:35, from backends/backend_openssl.c:23: /usr/include/openssl/evp.h:1406:5: note: expected ‘size_t {aka long unsigned int }’ but argument is of type ‘uint32_t {aka unsigned int }’ int EVP_PKEY_derive(EVP_PKEY_CTX ctx, unsigned char key, size_t *keylen); ^~~~~~~ backends/backend_openssl.c:1691:2: error: implicit declaration of function ‘EVP_KDF_CTX_free’; did you mean ‘EVP_MD_CTX_free’? [-Werror=implicit-function-declaration] EVP_KDF_CTX_free(ctx); ^~~~EVP_MD_CTX_free cc1: all warnings being treated as errors