Bypass __get_openssl_constructor() and always use our own blake2 implementation

This commit is contained in:
Christian Heimes 2016-09-07 02:35:13 +02:00
parent cd14d5d299
commit 32a2ceead7
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ def __get_builtin_constructor(name):
def __get_openssl_constructor(name):
if name in {'blake2b', 'blake2s'}:
# Prefer our blake2 implementation.
return __get_builtin_constructor(name)
try:
f = getattr(_hashlib, 'openssl_' + name)
# Allow the C module to raise ValueError. The function will be