Closed urcheon closed 6 years ago
I'm à bit confused by this change. I mean, yes, it's good that L_ENDIAN
and B_ENDIAN
get defined, but I fail to see where those macros are used...
e_chil.c line 844 and 866
In hwcrhk_mpi_bn2mpi
if (BN_bn2lebinpad(bn, mpi->buf, mpi_size) != mpi_size) {
if (BN_bn2binpad(bn, mpi->buf, mpi_size) != mpi_size) {
In hwcrhk_mpi_mpi2bn
return BN_lebin2bn(mpi->buf, mpi->size, ret);
return BN_bin2bn(mpi->buf, mpi->size, ret);
Ahhh, the code was already there! Makes sense, since this was an internal part of OpenSSL and got those macros served on the compiling command line. Good catch!
When converting to and from MPI to BN, we need to have L_ENDIAN defined on little-endian machines. So added AC_C_BIGENDIAN to configure.ac
Also, autoconf is creating a config.h which we weren't using.