wazuh

ld: error: undefined symbol: SSL_get1_peer_certificate


When building wazuh agent in FreeBSD,

Wazuh Version : 4.5.2 https://github.com/wazuh/wazuh/archive/refs/tags/v4.5.2.zip

Commands ran: gmake deps gmake TARGET=agent build

Got the error :(

CC wazuh-agentd
ld: error: undefined symbol: SSL_get1_peer_certificate
referenced by check_cert.c
check_cert.o:(check_x509_cert) in archive libwazuh.a
did you mean: SSL_get_peer_certificate
defined in: libwazuhext.so
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:1937: wazuh-agentd] Error 1
gmake[1]: Leaving directory '/home/sas/wazuh-agent/zrepo/wazuh-4.7.2/src'
gmake: *** [Makefile:814: agent] Error 2

FreeBSD version : 13.1-RELEASE


Solution

  • The issue is due to openssl version (3.0.12_2,1) installed in my machine which expects of SSL_get1_peer_certificate mismatches with the one included in the source SSL_get_peer_certificate

    Uninstalling the openssl pkg pkg remove openssl and using the one from wazuh libraries solved the problem.