[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Jun 23 00:59:55 UTC 2015


The branch master has been updated
       via  a1c506ae9ecb493bb1ae3226100b489e56c4d307 (commit)
       via  ed45f3c24212f612a3d029760fa5fa7dc0907074 (commit)
      from  cc3f3fc2b1c94d65824ab8d69595b6d89b17cf8d (commit)


- Log -----------------------------------------------------------------
commit a1c506ae9ecb493bb1ae3226100b489e56c4d307
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Jun 23 01:58:10 2015 +0200

    make update
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit ed45f3c24212f612a3d029760fa5fa7dc0907074
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Jun 23 01:55:46 2015 +0200

    Rearrange rsaz
    
    A small rearrangement so the inclusion of rsaz_exp.h would be
    unconditional, but what that header defines becomes conditional.
    
    This solves the weirdness where rsaz_exp.h gets in and out of the
    dependency list for bn_exp.c, depending on the present architecture.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/Makefile   |  2 +-
 crypto/bn/bn_exp.c   |  8 +-------
 crypto/bn/rsaz_exp.c | 10 ++++++++++
 crypto/bn/rsaz_exp.h | 11 ++++++++++-
 4 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile
index 8875c41..7d55778 100644
--- a/crypto/bn/Makefile
+++ b/crypto/bn/Makefile
@@ -247,7 +247,7 @@ bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
 bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
 bn_exp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
 bn_exp.o: ../../include/openssl/symhacks.h ../include/internal/bn_int.h
-bn_exp.o: ../include/internal/cryptlib.h bn_exp.c bn_lcl.h
+bn_exp.o: ../include/internal/cryptlib.h bn_exp.c bn_lcl.h rsaz_exp.h
 bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
 bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
 bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 6ce6f8d..10dc3eb 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -126,13 +126,7 @@
 # include <alloca.h>
 #endif
 
-#undef RSAZ_ENABLED
-#if defined(OPENSSL_BN_ASM_MONT) && \
-        (defined(__x86_64) || defined(__x86_64__) || \
-         defined(_M_AMD64) || defined(_M_X64))
-# include "rsaz_exp.h"
-# define RSAZ_ENABLED
-#endif
+#include "rsaz_exp.h"
 
 #undef SPARC_T4_MONT
 #if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
diff --git a/crypto/bn/rsaz_exp.c b/crypto/bn/rsaz_exp.c
index a486b15..c54c6fe 100644
--- a/crypto/bn/rsaz_exp.c
+++ b/crypto/bn/rsaz_exp.c
@@ -42,6 +42,8 @@
 
 #include "rsaz_exp.h"
 
+#ifdef RSAZ_ENABLED
+
 /*
  * See crypto/bn/asm/rsaz-avx2.pl for further details.
  */
@@ -334,3 +336,11 @@ void RSAZ_512_mod_exp(BN_ULONG result[8],
 
     OPENSSL_cleanse(storage, sizeof(storage));
 }
+
+#else
+
+# if defined(PEDANTIC) || defined(__DECC) || defined(__clang__)
+static void *dummy = &dummy;
+# endif
+
+#endif
diff --git a/crypto/bn/rsaz_exp.h b/crypto/bn/rsaz_exp.h
index bb71fb1..33361de 100644
--- a/crypto/bn/rsaz_exp.h
+++ b/crypto/bn/rsaz_exp.h
@@ -31,7 +31,13 @@
 #ifndef RSAZ_EXP_H
 # define RSAZ_EXP_H
 
-# include <openssl/bn.h>
+# undef RSAZ_ENABLED
+# if defined(OPENSSL_BN_ASM_MONT) && \
+        (defined(__x86_64) || defined(__x86_64__) || \
+         defined(_M_AMD64) || defined(_M_X64))
+#  define RSAZ_ENABLED
+
+#  include <openssl/bn.h>
 
 void RSAZ_1024_mod_exp_avx2(BN_ULONG result[16],
                             const BN_ULONG base_norm[16],
@@ -44,4 +50,7 @@ void RSAZ_512_mod_exp(BN_ULONG result[8],
                       const BN_ULONG base_norm[8], const BN_ULONG exponent[8],
                       const BN_ULONG m_norm[8], BN_ULONG k0,
                       const BN_ULONG RR[8]);
+
+# endif
+
 #endif


More information about the openssl-commits mailing list