diff options
author | Sebastian Ramacher <sebastian+dev@ramacher.at> | 2013-10-28 02:52:39 +0100 |
---|---|---|
committer | Sebastian Ramacher <sebastian+dev@ramacher.at> | 2013-10-28 17:57:36 +0100 |
commit | 8b68505248a54477f7cb81b30e33520d9c5d1083 (patch) | |
tree | d7c3f7b766ffa99f8edf4105d3ae8f907edde473 /setup.py | |
parent | 8cde8b9893819e9586bde2ce9be84f24689ff0d9 (diff) | |
download | pycrypto-8b68505248a54477f7cb81b30e33520d9c5d1083.tar.gz |
Make sure that ek and dk are aligned at 16 byte boundaries
ek and dk are used as operands in instructions that require 16 byte alignment.
Thanks to Greg Price for finding this issue.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -166,6 +166,10 @@ class PCTBuildExt (build_ext): if not ac.get("HAVE_WMMINTRIN_H"): # AES-NI instrincs not available self.__remove_extensions(["Crypto.Cipher._AESNI"]) + elif not (ac.get("HAVE_POSIX_MEMALIGN") or ac.get("HAVE_ALIGNED_ALLOC") + or ac.get("HAVE__ALIGNED_MALLOC")): + # no function to allocate aligned memory is available + self.__remove_extensions(["Crypto.Cipher._AESNI"]) elif ac.get("HAVE_MAES"): # -maes has to be passed to the compiler to use the AES-NI instrincs self.__add_extension_compile_option(["Crypto.Cipher._AESNI"], |