[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Tue Feb 23 18:19:36 UTC 2016
The branch master has been updated
via 78c830785ca0f422502db9b201127ef1d9fe3966 (commit)
from a44a208442ecf8f576c9e364f8b46b6661c7d2de (commit)
- Log -----------------------------------------------------------------
commit 78c830785ca0f422502db9b201127ef1d9fe3966
Author: David Woodhouse <David.Woodhouse at intel.com>
Date: Sat Feb 20 14:40:48 2016 +0000
RT4339: Fix handling of <internal/bn_conf.h>
The entire contents of <internal/bn_conf.h> are unwanted in the UEFI
build because we have to do it differently there. To support building
for both 32-bit and 64-bit platforms without re-running the OpenSSL
Configure script, the EDK2 environment defines THIRTY_TWO_BIT or
SIXTY_FOUR_BIT for itself according to the target platform.
The current setup is broken, though. It checks for OPENSSL_SYS_UEFI but
before it's actually defined, since opensslconf.h hasn't yet been
included.
Let's fix that by including opensslconf.h. And also let's move the
bn_conf.h doesn't even need to *exist* in the UEFI build environment.
This is also GH PR736.
Signed-off-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/bn/bn_lcl.h | 12 +++++++++++-
crypto/include/internal/bn_conf.h.in | 7 +++++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h
index 0f3205c..4af8bfb 100644
--- a/crypto/bn/bn_lcl.h
+++ b/crypto/bn/bn_lcl.h
@@ -111,7 +111,17 @@
#ifndef HEADER_BN_LCL_H
# define HEADER_BN_LCL_H
-# include "internal/bn_conf.h"
+/*
+ * The EDK2 build doesn't use bn_conf.h; it sets THIRTY_TWO_BIT or
+ * SIXTY_FOUR_BIT in its own environment since it doesn't re-run our
+ * Configure script and needs to support both 32-bit and 64-bit.
+ */
+# include <openssl/opensslconf.h>
+
+# if !defined(OPENSSL_SYS_UEFI)
+# include "internal/bn_conf.h"
+# endif
+
# include "internal/bn_int.h"
#ifdef __cplusplus
diff --git a/crypto/include/internal/bn_conf.h.in b/crypto/include/internal/bn_conf.h.in
index 5ebd55d..e25a435 100644
--- a/crypto/include/internal/bn_conf.h.in
+++ b/crypto/include/internal/bn_conf.h.in
@@ -56,7 +56,11 @@
#ifndef HEADER_BN_CONF_H
# define HEADER_BN_CONF_H
-# if !defined(OPENSSL_SYS_UEFI)
+/*
+ * The contents of this file are not used in the UEFI build, as
+ * both 32-bit and 64-bit builds are supported from a single run
+ * of the Configure script.
+ */
/* Should we define BN_DIV2W here? */
@@ -64,6 +68,5 @@
{- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG
{- $config{b64} ? "#define" : "#undef" -} SIXTY_FOUR_BIT
{- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT
-# endif
#endif
More information about the openssl-commits
mailing list