]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ec: Fail build on big-endian with enable-ec_nistp_64_gcc_128
authorMartin Schwenke <martin@meltin.net>
Fri, 18 Jun 2021 06:35:16 +0000 (16:35 +1000)
committerPauli <pauli@openssl.org>
Tue, 22 Jun 2021 08:27:29 +0000 (18:27 +1000)
I can't see way of making Configure fail but this at least makes the
build fail.

Fixes #15821

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15831)

crypto/ec/ec_local.h

index 693f21fa29ae041ae08caa0491428ac787ec4e97..f34e06aea89a7ab9d156ef063fafe741e1c820db 100644 (file)
@@ -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,