Repository navigation
Fails to build on OpenSSL-4.x-dev #491
Description
Activity
Thank you for the report. Unfortunately, the problem is deeper: provider depends on removed ENGINE interfaces, so a huge refactoring is anticipated.
Reacted by Mouseprovider depends on removed ENGINE interfaces, so a huge refactoring is anticipated
I suspected as much. ;-)
let's try the power of copilot ))
Reacted by Mouse@mouse07410 can you have a look please #492
@chipitsine looks promising! Unfortunately, Copilot does not seem to accept commands from me - please feel free to take a look at #492 (comment) and tell Copilot to fix it.
Problem persists - summary
#492 fails to compile with OpenSSL-4.0-dev, and gostprov fails some tests on OpenSSL-3.5.4.
Details
OpenSSL-4.0-dev
Configuration:
cmake-4-out.txtFailing build:
make-4-out.txtObviously, tests fail:
test-4-out.txtGist:
[ 9%] Building C object CMakeFiles/gost_core.dir/gost_pmeth.c.o /opt/local/bin/clang -DHAVE_ADDCARRY_U64 -DL_ENDIAN -isystem /Users/ur20980/openssl-4/include -O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -g -O2 -std=gnu90 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk -fPIC -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Qunused-arguments -Wno-deprecated-declarations "-Wno-error=#warnings" -MD -MT CMakeFiles/gost_core.dir/gost_pmeth.c.o -MF CMakeFiles/gost_core.dir/gost_pmeth.c.o.d -o CMakeFiles/gost_core.dir/gost_pmeth.c.o -c /Users/ur20980/src/grasshopper-engine/gost_pmeth.c In file included from /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:19: /Users/ur20980/src/grasshopper-engine/gost_lcl.h:36:5: warning: "Gost-engine is built against not fully supported version of OpenSSL. EVP_CTRL_SET_TLSTREE_PARAMS definition in OpenSSL is expected." [-W#warnings] 36 | # warning "Gost-engine is built against not fully supported version of OpenSSL. \ | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:813:24: error: implicit declaration of function 'EVP_MD_meth_get_ctrl' [-Werror,-Wimplicit-function-declaration] 813 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:813:24: note: did you mean 'BIO_meth_get_ctrl'? /Users/ur20980/openssl-4/include/openssl/bio.h:1018:30: note: 'BIO_meth_get_ctrl' declared here 1018 | OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int, | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:814:21: error: called object type 'int' is not a function or function pointer 813 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 814 | (mctx, EVP_MD_CTRL_SET_KEY, 0, key); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:816:24: error: implicit declaration of function 'EVP_MD_meth_get_ctrl' [-Werror,-Wimplicit-function-declaration] 816 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:817:21: error: called object type 'int' is not a function or function pointer 816 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 817 | (mctx, EVP_MD_CTRL_SET_KEY, 32, &(data->key)); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:946:24: error: implicit declaration of function 'EVP_MD_meth_get_ctrl' [-Werror,-Wimplicit-function-declaration] 946 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:947:21: error: called object type 'int' is not a function or function pointer 946 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 947 | (mctx, EVP_MD_CTRL_SET_KEY, 0, key); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:949:24: error: implicit declaration of function 'EVP_MD_meth_get_ctrl' [-Werror,-Wimplicit-function-declaration] 949 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:950:21: error: called object type 'int' is not a function or function pointer 949 | return EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 950 | (mctx, EVP_MD_CTRL_SET_KEY, 32, &(data->key)); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1135:5: error: implicit declaration of function 'EVP_MD_meth_get_ctrl' [-Werror,-Wimplicit-function-declaration] 1135 | EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1136:9: error: called object type 'int' is not a function or function pointer 1135 | EVP_MD_meth_get_ctrl(EVP_MD_CTX_md(mctx)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | (mctx, EVP_MD_CTRL_MAC_LEN, data->mac_size, NULL); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1153:14: error: implicit declaration of function 'EVP_PKEY_meth_new' [-Werror,-Wimplicit-function-declaration] 1153 | *pmeth = EVP_PKEY_meth_new(id, flags); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1153:12: error: incompatible integer to pointer conversion assigning to 'EVP_PKEY_METHOD *' (aka 'struct evp_pkey_method_st *') from 'int' [-Wint-conversion] 1153 | *pmeth = EVP_PKEY_meth_new(id, flags); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1160:9: error: implicit declaration of function 'EVP_PKEY_meth_set_ctrl' [-Werror,-Wimplicit-function-declaration] 1160 | EVP_PKEY_meth_set_ctrl(*pmeth, | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1160:9: note: did you mean 'EVP_PKEY_asn1_set_ctrl'? /Users/ur20980/openssl-4/include/openssl/evp.h:1586:6: note: 'EVP_PKEY_asn1_set_ctrl' declared here 1586 | void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1162:9: error: implicit declaration of function 'EVP_PKEY_meth_set_sign' [-Werror,-Wimplicit-function-declaration] 1162 | EVP_PKEY_meth_set_sign(*pmeth, NULL, pkey_gost_ec_cp_sign); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1163:9: error: implicit declaration of function 'EVP_PKEY_meth_set_verify' [-Werror,-Wimplicit-function-declaration] 1163 | EVP_PKEY_meth_set_verify(*pmeth, NULL, pkey_gost_ec_cp_verify); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1165:9: error: implicit declaration of function 'EVP_PKEY_meth_set_keygen' [-Werror,-Wimplicit-function-declaration] 1165 | EVP_PKEY_meth_set_keygen(*pmeth, NULL, pkey_gost2001cp_keygen); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1167:9: error: implicit declaration of function 'EVP_PKEY_meth_set_encrypt' [-Werror,-Wimplicit-function-declaration] 1167 | EVP_PKEY_meth_set_encrypt(*pmeth, | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1170:9: error: implicit declaration of function 'EVP_PKEY_meth_set_decrypt' [-Werror,-Wimplicit-function-declaration] 1170 | EVP_PKEY_meth_set_decrypt(*pmeth, NULL, pkey_gost_decrypt); | ^ /Users/ur20980/src/grasshopper-engine/gost_pmeth.c:1171:9: error: implicit declaration of function 'EVP_PKEY_meth_set_derive' [-Werror,-Wimplicit-function-declaration] 1171 | EVP_PKEY_meth_set_derive(*pmeth, | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. make[2]: *** [CMakeFiles/gost_core.dir/gost_pmeth.c.o] Error 1OpenSSL-3.5.4
Configuration:
cmake-3m-out.txtBuild:
make-3m-out.txtTests (provider tests fail, engine tests pass):
test-3m-long-out.txtGist:
Running tests... /opt/local/bin/ctest --force-new-ctest-process Test project /Users/ur20980/src/grasshopper-engine/build Start 1: digest-with-provider 1/6 Test #1: digest-with-provider .............Subprocess aborted***Exception: 0.02 sec Start 2: ciphers-with-provider 2/6 Test #2: ciphers-with-provider ............Subprocess aborted***Exception: 0.02 sec Start 3: curves 3/6 Test #3: curves ........................... Passed 0.07 sec Start 4: context-with-provider 4/6 Test #4: context-with-provider ............Subprocess aborted***Exception: 0.02 sec Start 5: keyexpimp 5/6 Test #5: keyexpimp ........................ Passed 0.04 sec Start 6: gost89 6/6 Test #6: gost89 ........................... Passed 0.02 sec 50% tests passed, 3 tests failed out of 6 Total Test time (real) = 0.19 sec The following tests FAILED: 1 - digest-with-provider (Subprocess aborted) 2 - ciphers-with-provider (Subprocess aborted) 4 - context-with-provider (Subprocess aborted)I think we must confess that copilot did its best and we won't get more from it
I think we must confess that copilot did its best and we won't get more from it
Respectfully disagree - in my experience, Copilot can do a lot more - with a lot of continuous prodding. If you expect to just point it at a problem and get a complete solution by its next iteration - you're likely to be very disappointed.
(As for me - Copilot helped very much in clearing out all the issues in one pretty complex repo I maintain.)
Update
Just pass my reported updates to it. I would've done it myself, but in this repo it appears to react only to you.
OK, I'm done here too.
Problem
OpenSSL-4 officially removed support for Engine API from the code. As a result, attempt to build this repo with OpenSSL-4-dev fails:
In case configuration matters:
Proposed solution
Split cleanly between Engine and Provider build - make it possible to build one or the other, via
maketarget, and describe this process in the README.