diff options
author | Richard Levitte <levitte@openssl.org> | 2015-06-23 01:55:46 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-06-23 02:59:47 +0200 |
commit | ed45f3c24212f612a3d029760fa5fa7dc0907074 (patch) | |
tree | fc19281918beef78ebbd929322b4a82524e4af9b /crypto/bn/rsaz_exp.h | |
parent | cc3f3fc2b1c94d65824ab8d69595b6d89b17cf8d (diff) | |
download | openssl-ed45f3c24212f612a3d029760fa5fa7dc0907074.zip openssl-ed45f3c24212f612a3d029760fa5fa7dc0907074.tar.gz openssl-ed45f3c24212f612a3d029760fa5fa7dc0907074.tar.bz2 |
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@openssl.org>
Diffstat (limited to 'crypto/bn/rsaz_exp.h')
-rw-r--r-- | crypto/bn/rsaz_exp.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 |