1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, aiohttp 6, asn1crypto 7, cryptography 8, oscrypto 9, requests 10, uritools 11, openssl 12, pytestCheckHook 13}: 14 15buildPythonPackage rec { 16 pname = "pyhanko-certvalidator"; 17 version = "0.19.5"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 # Tests are only available on GitHub 23 src = fetchFromGitHub { 24 owner = "MatthiasValvekens"; 25 repo = "certvalidator"; 26 rev = version; 27 sha256 = "sha256-UxlBggKgqvbKioG98UaKvhW0YgEa6PqV913nqYvTx1I="; 28 }; 29 30 propagatedBuildInputs = [ 31 asn1crypto 32 cryptography 33 oscrypto 34 requests 35 uritools 36 ]; 37 38 checkInputs = [ 39 aiohttp 40 pytestCheckHook 41 ]; 42 43 disabledTestPaths = [ 44 # Test looks for libcrypto.so.1.1 45 "dev/stress_test.py" 46 # Requests 47 "tests/test_crl_client.py" 48 ]; 49 50 disabledTests = [ 51 # Look for nonexisting certificates 52 "test_basic_certificate_validator_tls" 53 # Failed to fetch OCSP response from http://ocsp.digicert.com 54 "test_fetch_ocsp_aiohttp" 55 "test_fetch_ocsp_requests" 56 "test_fetch_ocsp_err_requests" 57 # Unable to build a validation path for the certificate "%s" - no issuer matching "%s" was found 58 "test_revocation_mode_hard_aiohttp_autofetch" 59 # The path could not be validated because no revocation information could be found for intermediate certificate 1 60 "test_revocation_mode_hard" 61 # certificate expired 2022-09-17 62 "test_revocation_mode_soft" 63 ]; 64 65 pythonImportsCheck = [ 66 "pyhanko_certvalidator" 67 ]; 68 69 meta = with lib; { 70 description = "Python library for validating X.509 certificates and paths"; 71 homepage = "https://github.com/MatthiasValvekens/certvalidator"; 72 license = licenses.mit; 73 maintainers = with maintainers; [ wolfangaukang ]; 74 }; 75}