pythonPackages.signify: init at 0.3.0
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
This commit is contained in:
parent
9033b0a931
commit
8578ba7cd4
|
@ -0,0 +1,18 @@
|
|||
diff --git a/tests/test_authenticode.py b/tests/test_authenticode.py
|
||||
index 7e2c709..2f27e09 100644
|
||||
--- a/tests/test_authenticode.py
|
||||
+++ b/tests/test_authenticode.py
|
||||
@@ -153,10 +153,12 @@ class AuthenticodeParserTestCase(unittest.TestCase):
|
||||
"""this certificate is revoked"""
|
||||
with open(str(root_dir / "test_data" / "jameslth"), "rb") as f:
|
||||
pefile = SignedPEFile(f)
|
||||
- pefile.verify()
|
||||
+ pefile.verify(verification_context_kwargs=
|
||||
+ {'timestamp': datetime.datetime(2021, 1, 1, tzinfo=datetime.timezone.utc)})
|
||||
|
||||
def test_jameslth_revoked(self):
|
||||
"""this certificate is revoked"""
|
||||
+ # TODO: this certificate is now expired, so it will not show up as valid anyway
|
||||
with open(str(root_dir / "test_data" / "jameslth"), "rb") as f:
|
||||
pefile = SignedPEFile(f)
|
||||
with self.assertRaises(VerificationError):
|
36
pkgs/development/python-modules/signify/default.nix
Normal file
36
pkgs/development/python-modules/signify/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, pytestCheckHook
|
||||
, certvalidator, pyasn1, pyasn1-modules
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "signify";
|
||||
version = "0.3.0";
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ralphje";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-JxQECpwHhPm8TCVW/bCnEpu5I/WETyZVBx29SQE4NmE=";
|
||||
};
|
||||
patches = [
|
||||
# Upstream patch is available here:
|
||||
# https://github.com/ralphje/signify/commit/8c345be954e898a317825bb450bed5ba0304b2b5.patch
|
||||
# But update a couple other things and dont apply cleanly. This is an extract of the part
|
||||
# we care about and breaks the tests after 2021-03-01
|
||||
./certificate-expiration-date.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ certvalidator pyasn1 pyasn1-modules ];
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
pytestFlagsArray = [ "-v" ];
|
||||
pythonImportsCheck = [ "signify" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ralphje/signify";
|
||||
description = "library that verifies PE Authenticode-signed binaries";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ baloo ];
|
||||
};
|
||||
}
|
|
@ -7368,6 +7368,8 @@ in {
|
|||
|
||||
singledispatch = callPackage ../development/python-modules/singledispatch { };
|
||||
|
||||
signify = callPackage ../development/python-modules/signify { };
|
||||
|
||||
sip = callPackage ../development/python-modules/sip { };
|
||||
|
||||
sip_5 = callPackage ../development/python-modules/sip/5.x.nix { };
|
||||
|
|
Loading…
Reference in a new issue