openca / libpki

Easy-to-use high-level library for PKI-enabled applications
Other
50 stars 34 forks source link

libpki 0.8.9 fails to build on CentOS 8 #51

Closed MagellanTX closed 1 year ago

MagellanTX commented 3 years ago

I'm trying to build the libpki library on CentOS 8 but part-way into the make, it stops with the error below. My guess is that it has something to do with openssl (1.1.1f), but not sure.

It builds fine on CentOS 7

make[3]: Entering directory '/root/libpki/src/drivers'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/libpki  -I..  -D__LIB_BUILD__  -I/usr/include -g -O2 -fstack-check -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable  -DENABLE_ECDSA=1   -I/usr/include/libxml2   -DLINUX -g -O2 -fstack-check -maccumulate-outgoing-args -Werror -Wfatal-errors -MT libpki_token_la-hsm_main.lo -MD -MP -MF .deps/libpki_token_la-hsm_main.Tpo -c -o libpki_token_la-hsm_main.lo `test -f 'hsm_main.c' || echo './'`hsm_main.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/libpki -I.. -D__LIB_BUILD__ -I/usr/include -g -O2 -fstack-check -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable -DENABLE_ECDSA=1 -I/usr/include/libxml2 -DLINUX -g -O2 -fstack-check -maccumulate-outgoing-args -Werror -Wfatal-errors -MT libpki_token_la-hsm_main.lo -MD -MP -MF .deps/libpki_token_la-hsm_main.Tpo -c hsm_main.c  -fPIC -DPIC -o .libs/libpki_token_la-hsm_main.o
hsm_main.c: In function ‘PKI_verify_signature’:
hsm_main.c:1016:2: error: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Werror=implicit-function-declaration]
  EVP_MD_CTX_cleanup(ctx);
  ^~~~~~~~~~~~~~~~~~
jverne commented 3 years ago

libpki doesn't build with OpenSSL 1.1.1f because some of the API has become opaque. I suspect it wants 0.9.x. So if you can find a way to provide the earlier release to configure that might solve it.

opencrypto commented 1 year ago

Fixed in PR #29