gcc -fPIC -Wall -I. -I/usr/local/include -DHAVE_CONFIG_H -c cmb.c -o cmb.o
cmb.c: In function ‘cmb_count_bn’:
cmb.c:854:13: error: invalid use of void expression
854 | if (!BN_zero(count))
| ^
cmb.c: In function ‘cmb_bn’:
cmb.c:1032:21: error: invalid use of void expression
1032 | if (!BN_zero(seq))
| ^
make: *** [GNUmakefile:39: cmb.o] Error 1
I get the following error with
gcc
12.Per the OpenSSL docs:
This can be fixed by enabling the deprecated API using
OPENSSL_API_COMPAT
, but this is incompatible with LibreSSL where the deprecated API is still available under the nameBN_zero
(source):One approach is to switch to the new API
BN_zero_ex()
which appeared in OpenSSL 0.9.8. Another is to useBN_set_word
as here:which is compatible with older versions of OpenSSL.