BN: Check endianness in run-time, in BN_native2bn() and BN_bn2nativepad()
authorRichard Levitte <levitte@openssl.org>
Thu, 9 Jul 2020 06:40:50 +0000 (08:40 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 11 Jul 2020 08:00:33 +0000 (10:00 +0200)
commit310a0edbd003dd7c580ae3cf78f1782b2c3d9ded
tree46fc233a14e17822b083744811beb8a138fc5699
parente23d850ff3281220f33ed78d9ca4fcadfa279565
BN: Check endianness in run-time, in BN_native2bn() and BN_bn2nativepad()

The code relied on B_ENDIAN being defined on all big-endian platform,
which turned out to not always be the case.

Fixes #12387

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/12390)
crypto/bn/bn_lib.c