aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/bn/rsaz_exp.h
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/bn/rsaz_exp.h')
-rwxr-xr-xopenssl/crypto/bn/rsaz_exp.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/openssl/crypto/bn/rsaz_exp.h b/openssl/crypto/bn/rsaz_exp.h
index bb71fb1e1..33361de99 100755
--- a/openssl/crypto/bn/rsaz_exp.h
+++ b/openssl/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