我正在尝试使用 openssl 1.1.1j 和 SoftHSMv2 v2.6.1 更新我的安装,命令“make”通过,但“make check”失败。不能参考 OSSLEDDSA.cpp 中的 EVP_DigestSign 和 EVP_DigestVerify。日志是:
Making check in src
make[1]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src”
Making check in lib
make[2]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib”
Making check in common
make[3]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/common”
make[3]: 对“check”无需做任何事。
make[3]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/common”
Making check in crypto
make[3]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto”
Making check in test
make[4]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/test”
make cryptotest
make[5]: 进入目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/test”
/bin/sh ../../../../libtool --tag=CXX --mode=link g++ -g -O2 -Wall -Wextra -fvisibility=hidden -lcrypto -L/usr/local/lib -lcppunit -ldl -no-install -o cryptotest cryptotest.o AESTests.o DESTests.o DHTests.o DSATests.o ECDHTests.o ECDSATests.o EDDSATests.o GOSTTests.o HashTests.o MacTests.o RNGTests.o RSATests.o chisq.o ent.o iso8859.o randtest.o ../../libsofthsm_convarch.la -ldl
libtool: link: g++ -g -O2 -Wall -Wextra -fvisibility=hidden -o cryptotest cryptotest.o AESTests.o DESTests.o DHTests.o DSATests.o ECDHTests.o ECDSATests.o EDDSATests.o GOSTTests.o HashTests.o MacTests.o RNGTests.o RSATests.o chisq.o ent.o iso8859.o randtest.o -L/usr/local/lib /usr/local/lib/libcppunit.so ../../.libs/libsofthsm_convarch.a -lcrypto /usr/lib/../lib64/libstdc++.so -lm -ldl -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/lib/../lib64 -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/lib/../lib64
../../.libs/libsofthsm_convarch.a(OSSLEDDSA.o): In function OSSLEDDSA::sign(PrivateKey*, ByteString const&, ByteString&, AsymMech::Type, void const*, unsigned long)': /home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/OSSLEDDSA.cpp:94: undefined reference to EVP_DigestSign'
../../.libs/libsofthsm_convarch.a(OSSLEDDSA.o): In function OSSLEDDSA::verify(PublicKey*, ByteString const&, ByteString const&, AsymMech::Type, void const*, unsigned long)': /home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/OSSLEDDSA.cpp:175: undefined reference to EVP_DigestVerify'
collect2: error: ld returned 1 exit status
make[5]: *** [cryptotest] 错误 1
make[5]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/test”
make[4]: *** [check-am] 错误 2
make[4]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto/test”
make[3]: *** [check-recursive] 错误 1
make[3]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib/crypto”
make[2]: *** [check-recursive] 错误 1
make[2]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src/lib”
make[1]: *** [check-recursive] 错误 1
make[1]: 离开目录“/home/centos/gopath/src/liucy/SoftHSMv2/src”
make: *** [check-recursive] 错误 1
我尝试从 makefile 中删除 OSSLEDDSA,“make check”通过了。
另外,基于相同的服务器环境,我写了一个demo简单地调用“EVP_DigestSign”,也通过了。
所以,我不知道我的环境出了什么问题,需要一些帮助,谢谢。