I'm try to use Openssl library for gem5.
My SimObject code include two header on Openssl.
#include <openssl/evp.h>
#include <openssl/aes.h>
But there is a link error. Error message is
undefined reference to `EVP_CIPHER_CTX_new'
undefined reference to `EVP_aes_128_ctr'
What we have already done
- apt install libssl-dev
- apt install libcrypto++6 libcrypto++6-dbg libcrypto++-dev
- Added to SConstruct in "if main['GCC']" block main.Append(LDFLAGS =["-L/usr/local/ssl/include"]) main.Append(LDLIBS=["-lcrypto"])
evp.h,and aes.h are in /usr/local/ssl/include/openssl
We would be grateful for your help!
$ openssl version -a
OpenSSL 1.1.1f 31 Mar 2020
built on: Mon Aug 23 17:02:39 2021 UTC
platform: debian-amd64
options: bn(64,64) rc4(16x,int) des(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-JWge0V/openssl-1.1.1f=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_TLS_SECURITY_LEVEL=2 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"
Seeding source: os-specific