[ python-Bugs-1535502 ] Python 2.5 windows builds should link hashlib with OpenSSL
SourceForge.net
noreply at sourceforge.net
Wed Aug 16 15:08:07 CEST 2006
Bugs item #1535502, was opened at 2006-08-06 21:38
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1535502&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Gregory P. Smith (greg)
Assigned to: Anthony Baxter (anthonybaxter)
Summary: Python 2.5 windows builds should link hashlib with OpenSSL
Initial Comment:
The Windows builds of Python 2.5 need to be updated to
build and link the hashlib modules with OpenSSL 0.9.8.
The OpenSSL implementations of the hash algorithms are
*much* faster (often 2-3x) than the fallback C
implementations that python includes for use when
OpenSSL isn't available.
I just tested the python 2.5b3 installer on windows.
its using the fallback versions rather than OpenSSL:
here's a simple way to check from a running python:
Without OpenSSL:
>>> import hashlib
>>> hashlib.sha1
<built-in function new>
With OpenSSL:
>>> import hashlib
>>> hashlib.sha1
<built-in function openssl_sha1>
(please use openssl 0.9.8; older versions don't include
sha256 and sha512 implementations)
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2006-08-16 15:08
Message:
Logged In: YES
user_id=21627
With Anthony's approval, this is now committed as r51310.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-08-09 16:34
Message:
Logged In: YES
user_id=21627
I changed the patch to support the Win64 build process, and
added packaging support (msi.py). It looks fine to me now.
Anthony, is this ok to apply?
----------------------------------------------------------------------
Comment By: Gregory P. Smith (greg)
Date: 2006-08-08 09:48
Message:
Logged In: YES
user_id=413
attached is a patch that works for me on Win XP with MSVS
2003 (vc++ 7.1): build_hashlib_with_ssl-01.patch
It does several things:
build_ssl.py -- this is fixed to use do_masm.bat instead
of a modified 32all.bat to build OpenSSL with x86 asm
optimizations on Win32. It is also fixed to work when under
a directory tree with spaces in the directory names.
_ssl.mak -- since both _ssl and _hashlib depend on OpenSSL
it made the most sense for both to be built by the same
makefile. I added _hashlib's build here.
_ssl.vcproj -- adds the dependancy on Modules/_hashopenssl.c
Things still TODO - make sure _hashlib.pyd is added to the
MSI installer.
----------------------------------------------------------------------
Comment By: Gregory P. Smith (greg)
Date: 2006-08-08 08:02
Message:
Logged In: YES
user_id=413
i've attached a patch to PCbuild/build_ssl.py that should
build the assembly optimized OpenSSL on windows by default.
Still todo: a _hashlib.vcproj file is needed. though
wouldn't it be easier for me to just build _hashlib.pyd from
within the _ssl.mak file?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1535502&group_id=5470
More information about the Python-bugs-list
mailing list