Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1411078629; bh=+/HcbcgH4CTMAXWLwM2XGGYqsxLP+7wrkSK+a2I/qqQ=; h=Date:From:To:Subject:References:In-Reply-To:From; b=U7IyhWRJHt/2r7KfTD5uT5hmQVijo7S5wgrWKj92PHNH1bZRRC2zYXuv750BBhCS1 FItzwT1Mw+3ZpdOcL1YGGNS01w5Fr4+6jVVOulID8aMMz3QSbEu65mL5LP9z8yyw3O kvEVGfQ+rITuQCmvZVegck+XD0ANGJK0bZzOCxVA= Date: Fri, 19 Sep 2014 00:17:08 +0200 From: Christian Heimes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Larry Martell , "python-list@python.org" Subject: Re: hashlib suddenly broken References: <541b1158$0$29967$c3e8da3$5496439d@news.astraweb.com> <541B455F.3040401@python.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411078630 news.xs4all.nl 2850 [2001:888:2000:d::a6]:49693 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78049 On 18.09.2014 23:39, Larry Martell wrote: > $ python > Python 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import _hashlib >>>> _hashlib.__file__ > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so' >>>> _hashlib.openssl_sha1() > Traceback (most recent call last): > File "", line 1, in > ValueError: unsupported hash type >>>> _hashlib.openssl_sha1().hexdigest() > Traceback (most recent call last): > File "", line 1, in > ValueError: unsupported hash type > For unknown reasions your OpenSSL version doesn't support SHA-1. Please try these two commands on the command line to check version and digest support of your OpenSSL: $ echo -n '' | openssl dgst -sha1 -hex (stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709 $ openssl version OpenSSL 1.0.1f 6 Jan 2014 Please also check which OpenSSL libcrypto is used by the _hashlib.so shared library. On OSX otool -L should give a similar output as ldd on Linux: $ otool -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so Christian