2020-07-18 16:06:22 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, nassl
|
|
|
|
, cryptography
|
|
|
|
, typing-extensions
|
|
|
|
, faker
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sslyze";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nabla-c0d3";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-20 23:08:51 +00:00
|
|
|
hash = "sha256-oSTKNiECczlPAbv5Azc023PcquFbnlC5O+8tVgNcUW0=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-05-20 23:08:51 +00:00
|
|
|
--replace "cryptography>=2.6,<3.5" "cryptography>=2.6,<4.0"
|
2020-07-18 16:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# Most of the tests are online; hence, applicable tests are listed
|
|
|
|
# explicitly here
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/test_main.py"
|
|
|
|
"tests/test_scanner.py"
|
|
|
|
"tests/cli_tests/test_console_output.py"
|
|
|
|
"tests/cli_tests/test_json_output.py"
|
|
|
|
"tests/cli_tests/test_server_string_parser.py"
|
|
|
|
"tests/plugins_tests/test_scan_commands.py"
|
|
|
|
"tests/plugins_tests/certificate_info/test_certificate_utils.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_error_client_certificate_needed"
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "sslyze" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ nassl cryptography typing-extensions faker ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/nabla-c0d3/sslyze";
|
|
|
|
description = "Fast and powerful SSL/TLS scanning library";
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.agpl3Only;
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ veehaitch ];
|
|
|
|
};
|
|
|
|
}
|