Closed Nagarjuna-jantali closed 3 years ago
Am Dienstag, dem 04.05.2021 um 08:37 -0700 schrieb Nagarjun:
Hello,
I am building acvp parser with backend openssl, i am using openssl-1.0.2l with openssl-fips-2.016, but getting below compilation errors. backends/backend_openssl.c: In function ‘_openssl_dsa_pqg_gen’: backends/backend_openssl.c:764:14: error: implicit declaration of function ‘FIPS_dsa_generate_pq’; did you mean ‘FIPS_dsa_generate_key’?
See https://github.com/smuellerDD/acvpparser/issues/15
backends/backend_openssl.c:2873:8: error: implicit declaration of function ‘EVP_KDF_CTX_new_id’; did you mean ‘EVP_PKEY_CTX_new_id’?
Disable all defines at the top of backend_openssl.c for OpenSSL versions >= 1.1.0
Ciao Stephan
Hello,
I am building acvp parser with backend openssl, i am using openssl-1.0.2l with openssl-fips-2.016, but getting below compilation errors. backends/backend_openssl.c: In function ‘_openssl_dsa_pqg_gen’: backends/backend_openssl.c:764:14: error: implicit declaration of function ‘FIPS_dsa_generate_pq’; did you mean ‘FIPS_dsa_generate_key’? [-Werror=implicit-function-declaration] CKINT_O_LOG(FIPS_dsa_generate_pq(ctx, L, N, ^ backends/backend_openssl.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:775:15: error: implicit declaration of function ‘FIPS_dsa_generate_g’; did you mean ‘FIPS_dsa_generate_key’? [-Werror=implicit-function-declaration] CKINT_O_LOG(FIPS_dsa_generate_g(ctx, p, q, &g, &h, NULL), ^ backends/backend_openssl.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c: In function ‘openssl_dsa_pq_ver’: backends/backend_openssl.c:887:14: error: implicit declaration of function ‘FIPS_dsa_builtin_paramgen’; did you mean ‘fips_dsa_builtin_paramgen2’? [-Werror=implicit-function-declaration] CKINT_O_LOG(FIPS_dsa_builtin_paramgen(dsa, data->L, data->N, NULL, ^ backends/backend_openssl.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c: In function ‘openssl_kdf108’: backends/backend_openssl.c:2850:2: error: unknown type name ‘EVP_KDF_CTX’; did you mean ‘EVP_MD_CTX’? EVP_KDF_CTX *ctx = NULL; ^
~~EVP_MD_CTX backends/backend_openssl.c:2873: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:2873:27: error: ‘EVP_KDF_KB’ undeclared (first use in this function); did you mean ‘EVP_PKEY_id’? ctx = EVP_KDF_CTX_new_id(EVP_KDF_KB); ^~~~~~ EVP_PKEY_id backends/backend_openssl.c:2873:27: note: each undeclared identifier is reported only once for each function it appears in backends/backend_openssl.c:2879:14: error: implicit declaration of function ‘EVP_KDF_ctrl’; did you mean ‘SSL_CTX_ctrl’? [-Werror=implicit-function-declaration] CKINT_O_LOG(EVP_KDF_ctrl(ctx, EVP_KDF_CTRL_SET_KB_MODE, ^ backends/backend_openssl.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2879: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2881: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2882: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2890: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2892: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2893: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2900: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2903: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2908: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2926: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2931: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2950: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.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2956:14: error: implicit declaration of function ‘EVP_KDF_DERIVE’; did you mean ‘EVP_PKEY_OP_DERIVE’? [-Werror=implicit-function-declaration] CKINT_O_LOG(EVP_KDF_DERIVE(ctx, data->derived_key.buf, ^ backends/backend_openssl.c:63:8: note: in definition of macro ‘CKINT_O_LOG’ ret = x; \ ^ backends/backend_openssl.c:2962:2: error: implicit declaration of function ‘EVP_KDF_CTX_free’; did you mean ‘EVP_PKEY_CTX_free’? [-Werror=implicit-function-declaration] EVP_KDF_CTX_free(ctx);Above error functions are not available in openssl-1.0.2l and openssl-fips-2.0.16, where are these defined ? do i need to replace these functions with respective alternatives from openssl-1.0.2l/openssl-fips-2.0.16.
Please let me know how i can resolve this.
Thanks, Nag