2011-12-28 20:21:52 +00:00
|
|
|
Upstream-Status: Pending
|
2011-12-02 20:20:01 +00:00
|
|
|
|
|
|
|
Received from H J Liu @ Intel
|
|
|
|
Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
|
2016-06-27 19:59:19 +00:00
|
|
|
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
|
2011-12-02 20:20:01 +00:00
|
|
|
|
|
|
|
ported the patch to the 1.0.0e version
|
2016-06-27 19:59:19 +00:00
|
|
|
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
|
2015-03-04 17:46:48 +00:00
|
|
|
Index: openssl-1.0.2/crypto/bn/bn.h
|
2011-12-02 20:20:01 +00:00
|
|
|
===================================================================
|
2015-03-04 17:46:48 +00:00
|
|
|
--- openssl-1.0.2.orig/crypto/bn/bn.h
|
|
|
|
+++ openssl-1.0.2/crypto/bn/bn.h
|
|
|
|
@@ -173,6 +173,13 @@ extern "C" {
|
|
|
|
# endif
|
2011-12-02 20:20:01 +00:00
|
|
|
# endif
|
|
|
|
|
|
|
|
+/* Address type. */
|
|
|
|
+#ifdef _WIN64
|
|
|
|
+#define BN_ADDR unsigned long long
|
|
|
|
+#else
|
|
|
|
+#define BN_ADDR unsigned long
|
|
|
|
+#endif
|
|
|
|
+
|
2015-03-04 17:46:48 +00:00
|
|
|
/*
|
|
|
|
* assuming long is 64bit - this is the DEC Alpha unsigned long long is only
|
|
|
|
* 64 bits :-(, don't define BN_LLONG for the DEC Alpha
|
|
|
|
Index: openssl-1.0.2/crypto/bn/bn_exp.c
|
2011-12-02 20:20:01 +00:00
|
|
|
===================================================================
|
2015-03-04 17:46:48 +00:00
|
|
|
--- openssl-1.0.2.orig/crypto/bn/bn_exp.c
|
|
|
|
+++ openssl-1.0.2/crypto/bn/bn_exp.c
|
|
|
|
@@ -638,7 +638,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU
|
|
|
|
* multiple.
|
|
|
|
*/
|
2011-12-02 20:20:01 +00:00
|
|
|
#define MOD_EXP_CTIME_ALIGN(x_) \
|
2015-03-04 17:46:48 +00:00
|
|
|
- ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((size_t)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
2011-12-02 20:20:01 +00:00
|
|
|
+ ((unsigned char*)(x_) + (MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH - (((BN_ADDR)(x_)) & (MOD_EXP_CTIME_MIN_CACHE_LINE_MASK))))
|
|
|
|
|
2015-03-04 17:46:48 +00:00
|
|
|
/*
|
|
|
|
* This variant of BN_mod_exp_mont() uses fixed windows and the special
|