无标题openssl引擎编写undefined symbol: bind_engine解决方法
Posted 今天也要努力搬砖
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无标题openssl引擎编写undefined symbol: bind_engine解决方法相关的知识,希望对你有一定的参考价值。
root@cd2e1925ffbe:/work/CyberSecurityCode/OSSL_EngineX# ./build/basic_digest.o
OpenSSL failed to load required configuration
140691275559808:error:2506406A:DSO support routines:dlfcn_bind_func:could not bind to the requested symbol name:crypto/dso/dso_dlfcn.c:188:symname(bind_engine): /work/CyberSecurityCode/OSSL_EngineX/build/engine_ex.so: undefined symbol: bind_engine
140691275559808:error:2506C06A:DSO support routines:DSO_bind_func:could not bind to the requested symbol name:crypto/dso/dso_lib.c:186:
140691275559808:error:260B6068:engine routines:dynamic_load:DSO failure:crypto/engine/eng_dyn.c:447:
140691275559808:error:260BC066:engine routines:int_engine_configure:engine configuration error:crypto/engine/eng_cnf.c:141:section=engine_x_section, name=dynamic_path, value=/work/CyberSecurityCode/OSSL_EngineX/build/engine_ex.so
140691275559808:error:0E07606D:configuration file routines:module_run:module initialization error:crypto/conf/conf_mod.c:177:module=engines, value=engine_section, retcode=-1
root@cd2e1925ffbe:/work/CyberSecurityCode/OSSL_EngineX#
问题:
参照openssl引擎OSSL_EngineX下载编译后,运行时出错DSO support routines:dlfcn_bind_func:could not bind to the requested symbol name:crypto/dso/dso_dlfcn.c:188:symname(bind_engine):,
详细错误内容如上图。
解决方法:
我是把原c文件改成cpp文件,用g++编译后出现了上面错误。我又改回去(改成.c文件,gcc编译)之后问题解决。
具体原因不知道。大概原因可能是原先的编译可能导致某个编译选项没设置。
./build/basic_digest.o
call bind
EngineX has been successfully loaded
engine name :Engine example
解决后测试:
root@cd2e1925ffbe:/work/CyberSecurityCode/OSSL_EngineX/tests# openssl dgst -sha1 -engine /work/CyberSecurityCode/OSSL_EngineX/build/engine_ex.so plain.text
call bind
engine "engineX" set.
call sha1_init
call sha1_update
call sha1_final
SHA1(plain.text)= 86a6f5008a6194c19377fcfe1bd4464dcf2dc512
call sha1_init
以上是关于无标题openssl引擎编写undefined symbol: bind_engine解决方法的主要内容,如果未能解决你的问题,请参考以下文章
无标题openssl引擎编写undefined symbol: bind_engine解决方法
编译openssl失败(SLES11.3), undefined reference to `OPENSSL_cpuid_setup'