Created attachment 413008 [details] emerge --info Emerging dev-python/cryptography-0.9.3 fails test suite with the error: ---- _____ TestPBKDF2HMAC.test_already_finalized ____ [...] cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported for PBKDF2 by this backend. ../cryptography-0.9.3-python3_4/lib/cryptography/hazmat/primitives/kdf/pbkdf2.py:29: UnsupportedAlgorithm ---- and likewise for the tests 'TestPBKDF2HMAC.test_invalid_key', 'TestPBKDF2HMAC.test_unicode_error_with_salt' and 'TestPBKDF2HMAC.test_unicode_error_with_key_material'. It seems that dev-python/pyopenssl is missing, at least the following workaround works: ~ # FEATURES="-test" emerge -av1 dev-python/cryptography ~ # FEATURES="-test" emerge -av1 dev-python/pyopenssl # test disabled due to bug #530934 ~ # emerge -av1 dev-python/cryptography # now test suite passes Reproducable: always Hardware is set to AMD64 but this might also affect all platforms. Additional information and (sanitized) log === build.log === ================= [...] tests/hazmat/primitives/test_pbkdf2hmac.py::TestPBKDF2HMAC::test_already_finalized FAILED tests/hazmat/primitives/test_pbkdf2hmac.py::TestPBKDF2HMAC::test_unsupported_algorithm PASSED tests/hazmat/primitives/test_pbkdf2hmac.py::TestPBKDF2HMAC::test_invalid_key FAILED tests/hazmat/primitives/test_pbkdf2hmac.py::TestPBKDF2HMAC::test_unicode_error_with_salt FAILED tests/hazmat/primitives/test_pbkdf2hmac.py::TestPBKDF2HMAC::test_unicode_error_with_key_material FAILED [...] ======= FAILURES ======= _______ TestPBKDF2HMAC.test_already_finalized _______ self = <tests.hazmat.primitives.test_pbkdf2hmac.TestPBKDF2HMAC object at 0x3c066dd5a58> def test_already_finalized(self): > kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) tests/hazmat/primitives/test_pbkdf2hmac.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x3c06b1d0208>, algorithm = <cryptography.hazmat.primitives.hashes.SHA1 object at 0x3c06b1d0390>, length = 20, salt = b'salt' iterations = 10, backend = <cryptography.hazmat.backends.multibackend.MultiBackend object at 0x3c066663eb8> def __init__(self, algorithm, length, salt, iterations, backend): if not isinstance(backend, PBKDF2HMACBackend): raise UnsupportedAlgorithm( "Backend object does not implement PBKDF2HMACBackend.", _Reasons.BACKEND_MISSING_INTERFACE ) if not backend.pbkdf2_hmac_supported(algorithm): raise UnsupportedAlgorithm( "{0} is not supported for PBKDF2 by this backend.".format( algorithm.name), > _Reasons.UNSUPPORTED_HASH ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported for PBKDF2 by this backend. ../cryptography-0.9.3-python3_4/lib/cryptography/hazmat/primitives/kdf/pbkdf2.py:29: UnsupportedAlgorithm _______ TestPBKDF2HMAC.test_invalid_key _______ self = <tests.hazmat.primitives.test_pbkdf2hmac.TestPBKDF2HMAC object at 0x3c06b1d0ba8> def test_invalid_key(self): > kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) tests/hazmat/primitives/test_pbkdf2hmac.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x3c06b1d0748>, algorithm = <cryptography.hazmat.primitives.hashes.SHA1 object at 0x3c06b1d02e8>, length = 20, salt = b'salt' iterations = 10, backend = <cryptography.hazmat.backends.multibackend.MultiBackend object at 0x3c066663eb8> def __init__(self, algorithm, length, salt, iterations, backend): if not isinstance(backend, PBKDF2HMACBackend): raise UnsupportedAlgorithm( "Backend object does not implement PBKDF2HMACBackend.", _Reasons.BACKEND_MISSING_INTERFACE ) if not backend.pbkdf2_hmac_supported(algorithm): raise UnsupportedAlgorithm( "{0} is not supported for PBKDF2 by this backend.".format( algorithm.name), > _Reasons.UNSUPPORTED_HASH ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported for PBKDF2 by this backend. ../cryptography-0.9.3-python3_4/lib/cryptography/hazmat/primitives/kdf/pbkdf2.py:29: UnsupportedAlgorithm _______ TestPBKDF2HMAC.test_unicode_error_with_salt _______ self = <tests.hazmat.primitives.test_pbkdf2hmac.TestPBKDF2HMAC object at 0x3c06c3d7a20> def test_unicode_error_with_salt(self): with pytest.raises(TypeError): > PBKDF2HMAC(hashes.SHA1(), 20, u"salt", 10, default_backend()) tests/hazmat/primitives/test_pbkdf2hmac.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x3c06aaa0d30>, algorithm = <cryptography.hazmat.primitives.hashes.SHA1 object at 0x3c06aaa0dd8>, length = 20, salt = 'salt', iterations = 10 backend = <cryptography.hazmat.backends.multibackend.MultiBackend object at 0x3c066663eb8> def __init__(self, algorithm, length, salt, iterations, backend): if not isinstance(backend, PBKDF2HMACBackend): raise UnsupportedAlgorithm( "Backend object does not implement PBKDF2HMACBackend.", _Reasons.BACKEND_MISSING_INTERFACE ) if not backend.pbkdf2_hmac_supported(algorithm): raise UnsupportedAlgorithm( "{0} is not supported for PBKDF2 by this backend.".format( algorithm.name), > _Reasons.UNSUPPORTED_HASH ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported for PBKDF2 by this backend. ../cryptography-0.9.3-python3_4/lib/cryptography/hazmat/primitives/kdf/pbkdf2.py:29: UnsupportedAlgorithm _______ TestPBKDF2HMAC.test_unicode_error_with_key_material _______ self = <tests.hazmat.primitives.test_pbkdf2hmac.TestPBKDF2HMAC object at 0x3c06aaa1f28> def test_unicode_error_with_key_material(self): > kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) tests/hazmat/primitives/test_pbkdf2hmac.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC object at 0x3c066958630>, algorithm = <cryptography.hazmat.primitives.hashes.SHA1 object at 0x3c06c1968d0>, length = 20, salt = b'salt' iterations = 10, backend = <cryptography.hazmat.backends.multibackend.MultiBackend object at 0x3c066663eb8> def __init__(self, algorithm, length, salt, iterations, backend): if not isinstance(backend, PBKDF2HMACBackend): raise UnsupportedAlgorithm( "Backend object does not implement PBKDF2HMACBackend.", _Reasons.BACKEND_MISSING_INTERFACE ) if not backend.pbkdf2_hmac_supported(algorithm): raise UnsupportedAlgorithm( "{0} is not supported for PBKDF2 by this backend.".format( algorithm.name), > _Reasons.UNSUPPORTED_HASH ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported for PBKDF2 by this backend. ../cryptography-0.9.3-python3_4/lib/cryptography/hazmat/primitives/kdf/pbkdf2.py:29: UnsupportedAlgorithm ======== 4 failed, 687 passed, 119 skipped in 21.85 seconds ======= * ERROR: dev-python/cryptography-0.9.3::gentoo failed (test phase): * Tests fail with python3.4 * * Call stack: * ebuild.sh, line 93: Called src_test * environment, line 3536: Called distutils-r1_src_test * environment, line 960: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 329: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 3092: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2216: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2214: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 590: Called distutils-r1_run_phase 'python_test' * environment, line 897: Called python_test * environment, line 3416: Called die * The specific snippet of code: * py.test -v || die "Tests fail with ${EPYTHON}" * * If you need support, post the output of `emerge --info '=dev-python/cryptography-0.9.3::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/cryptography-0.9.3::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-python/cryptography-0.9.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/cryptography-0.9.3/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/cryptography-0.9.3/work/cryptography-0.9.3' * S: '/var/tmp/portage/dev-python/cryptography-0.9.3/work/cryptography-0.9.3' === emerge -pqv '=dev-python/cryptography-0.9.3::gentoo' === ============================================================ [ebuild N ] dev-python/cryptography-0.9.3 USE="{test}" PYTHON_TARGETS="python2_7 python3_4 (-pypy) -python3_3"
commit c3c2f1823de4a8a9c479c2c874a846c4de30d3d9 Author: Justin Lecher <jlec@gentoo.org> Date: Thu Nov 12 10:26:21 2015 +0100 dev-python/cryptography: Drop vulnerable versions Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=561696 obsoletes: Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=561604 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=559648 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521796 Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c2f1823de4a8a9c479c2c874a846c4de30d3d9