From cd5fea4664994d907516d60eddd1b680344a556b Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 18 Jun 2021 16:35:16 +1000 Subject: [PATCH] ec: Fail build on big-endian with enable-ec_nistp_64_gcc_128 I can't see way of making Configure fail but this at least makes the build fail. Fixes #15821 Signed-off-by: Martin Schwenke Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15831) --- crypto/ec/ec_local.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/ec/ec_local.h b/crypto/ec/ec_local.h index 693f21fa29..f34e06aea8 100644 --- a/crypto/ec/ec_local.h +++ b/crypto/ec/ec_local.h @@ -508,6 +508,10 @@ int ossl_ec_GF2m_simple_field_div(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +# ifdef B_ENDIAN +# error "Can not enable ec_nistp_64_gcc_128 on big-endian systems" +# endif + /* method functions in ecp_nistp224.c */ int ossl_ec_GFp_nistp224_group_init(EC_GROUP *group); int ossl_ec_GFp_nistp224_group_set_curve(EC_GROUP *group, const BIGNUM *p, -- 2.34.1