[Bug 1971580] Re: md4 hash does not work for Python in Jammy
*** This bug is a duplicate of bug 1976299 *** https://bugs.launchpad.net/bugs/1976299 ** This bug has been marked a duplicate of bug 1976299 hashlib.algorithms_available lists algorithms that cannot be used -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1971580 Title: md4 hash does not work for Python in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1971580/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1971580] Re: md4 hash does not work for Python in Jammy
I see. So, it is not a Ubuntu bug although it is not that obvious. In short: 1) Some hashing algorithms with MD4 among them were disabled as obsoleted. 2) Cpython shows disabled hashing algorithms as available. Technically it is correct because they are can be enabled and used. But it does not mean that they can be used right away. Moreover, the exception you get is too generic and provides no help whatsoever. This workaround does the job: --- /etc/ssl/openssl.cnf.dist 2022-05-04 19:03:33.253072785 +0300 +++ /etc/ssl/openssl.cnf2022-05-04 19:08:48.828690506 +0300 @@ -56,6 +56,7 @@ # List of providers to load [provider_sect] default = default_sect +legacy = legacy_sect # The fips section name should match the section name inside the # included fipsmodule.cnf. # fips = fips_sect @@ -71,6 +72,9 @@ [default_sect] # activate = 1 +[legacy_sect] +activate = 1 + After that MD4 hash started working: $ python3.10 Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> hashlib.new('md4', b"text") Sebastien, thanks a lot! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1971580 Title: md4 hash does not work for Python in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1971580/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1971580] Re: md4 hash does not work for Python in Jammy
The md4 algorithm isn't documented on https://docs.python.org/3/library/hashlib.html but the documentation state it also depends of what openssl provides or https://www.openssl.org/news/changelog.html indicates that openssl3 marked md4 as a legacy provider see also https://github.com/python/cpython/issues/91257 ** Bug watch added: github.com/python/cpython/issues #91257 https://github.com/python/cpython/issues/91257 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1971580 Title: md4 hash does not work for Python in Jammy To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1971580/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs