I get the following error with gcc 12.
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
Per the OpenSSL docs:
...
In OpenSSL 0.9.8, BN_zero() was changed to not return a value; previous versions returned an int.
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 name BN_zero (source):
One approach is to switch to the new API BN_zero_ex() which appeared in OpenSSL 0.9.8. Another is to use BN_set_word as here:
# define BN_zero(a) (BN_set_word((a),0))
which is compatible with older versions of OpenSSL.
I get the following error with
gcc12.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_wordas here:which is compatible with older versions of OpenSSL.