source: packages/lang/python/patches/120-force-internal-modules-for-hashlib.patch @ 20372

Last change on this file since 20372 was 20372, checked in by lars, 7 years ago

[packages] python: Force usage of internal modules for hashlib instead of openssl

Python can either use it's own implementation for the hashlib functions or it
can use openssl. If openssl is installed it will choose the openssl based
variant. But since openssl is not a dependency, but could have been build before
python we'll have to force the python build to choose the internal variant.

Fixes #6883

File size: 1.1 KB

    diff --git a/ b/
    index 0e08e74..65161db 100644
    a b class PyBuildExt(build_ext): 
    623623        #print 'openssl_ver = 0x%08x' % openssl_ver 
    625         if (ssl_incs is not None and 
    626             ssl_libs is not None and 
    627             openssl_ver >= 0x00907000): 
     625#        if (ssl_incs is not None and 
     626#            ssl_libs is not None and 
     627#            openssl_ver >= 0x00907000): 
     628        if False: 
    628629            # The _hashlib module wraps optimized implementations 
    629630            # of hash functions from the OpenSSL library. 
    630631            exts.append( Extension('_hashlib', ['_hashopenssl.c'], 
    class PyBuildExt(build_ext): 
    644645                            depends = ['md5.h']) ) 
    645646            missing.append('_hashlib') 
    647         if (openssl_ver < 0x00908000): 
     648#        if (openssl_ver < 0x00908000): 
     649        if True: 
    648650            # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash 
    649651            exts.append( Extension('_sha256', ['sha256module.c']) ) 
    650652            exts.append( Extension('_sha512', ['sha512module.c']) ) 
Note: See TracBrowser for help on using the repository browser.