From a6bbc21dce7b8b3c3cd92378a0b2579a2fb45920 Mon Sep 17 00:00:00 2001 From: Viktor Dragomiretskyy Date: Tue, 10 Jun 2025 23:28:10 +1200 Subject: [PATCH] Release 0.15 --- debian/changelog | 9 +++++++++ debian/control | 1 - debian/rules | 5 ++++- setup.py | 2 +- validitysensor/tls.py | 2 +- validitysensor/usb.py | 4 +++- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9e3e336..8d7c453 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +python-validity (0.15~ppa2) noble; urgency=medium + + * Change all write paths to /var/run/python-validity + * Use a different partition table + signature for 0090 devices + * Docs fixes + * switch to noble + + -- unicorn Mon, 09 Jun 2025 20:19:55 +1200 + python-validity (0.14~ppa1) bionic; urgency=medium * Retry establishing TLS on Resume in case if it was already established. diff --git a/debian/control b/debian/control index 35eff4d..2b09da3 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,6 @@ Depends: ${python3:Depends}, dbus, open-fprintd (>= 0.6~), innoextract (>= 1.6~) -XB-Python-Version: ${python3:Versions} Description: Validity Fingerprint Sensor DBus Driver This package adds support to some Validity sensors. . diff --git a/debian/rules b/debian/rules index 9c8fd6a..d44c5b9 100755 --- a/debian/rules +++ b/debian/rules @@ -8,6 +8,9 @@ override_dh_installsystemd: dh_installsystemd --name=python3-validity - override_dh_auto_install: python3 ./setup.py install --root=$(CURDIR)/debian/tmp --prefix=/usr --install-layout=deb + +override_dh_auto_clean: + python3 ./setup.py clean + diff --git a/setup.py b/setup.py index 9c53e29..ac6d50b 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name='python-validity', - version='0.14', + version='0.15', py_modules=[], packages=['validitysensor'], scripts=[ diff --git a/validitysensor/tls.py b/validitysensor/tls.py index 8673b24..ec634c3 100644 --- a/validitysensor/tls.py +++ b/validitysensor/tls.py @@ -90,6 +90,7 @@ def unpad(b: bytes): class Tls: def __init__(self, usb: Usb): self.usb = usb + self.trace_enabled = False self.reset() try: with open('/sys/class/dmi/id/product_name', 'r') as node: @@ -103,7 +104,6 @@ class Tls: self.set_hwkey(product_name=product_name, serial_number=product_serial) def reset(self): - self.trace_enabled = False self.secure_rx = False self.secure_tx = False diff --git a/validitysensor/usb.py b/validitysensor/usb.py index ae67576..464b092 100644 --- a/validitysensor/usb.py +++ b/validitysensor/usb.py @@ -63,6 +63,7 @@ class Usb: self.dev = dev self.dev.default_timeout = 15000 + dev.set_configuration() def close(self): if self.dev is not None: @@ -110,7 +111,8 @@ class Usb: try: resp = self.dev.read(130, 1024 * 1024, timeout=10000) resp = bytes(resp) - self.trace('<130< %s' % hexlify(resp).decode()) + self.trace('<130< %d bytes' % len(resp)) + #self.trace('<130< %s' % hexlify(resp).decode()) return resp except Exception as e: self.trace('<130< Error: %s' % repr(e))