Daniel Eloff <dan.el...@gmail.com> added the comment: If you're missing any hash algorithm from openssl (say sha224) and the corresponding _sha224 module, hashlib will fail to import and no hash algorithms will be available.
Additionally, if no (or only some) openssl algorithms are available, the error branch expects every hash algorithm to be present in it's own module, if even one is missing, hashlib will fail to import. Producing a test case for these without mock objects is difficult at best. I leave that to the python team, if they desire to do so. Here is a rewritten hashlib.py, without that ugly mess of code and without the above two bugs. It passes all tests. ---------- Added file: http://bugs.python.org/file14297/hashlib.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6281> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com