nitrokey 0.4.0__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. {nitrokey-0.4.0 → nitrokey-0.4.2}/PKG-INFO +9 -10
  2. {nitrokey-0.4.0 → nitrokey-0.4.2}/README.md +2 -5
  3. {nitrokey-0.4.0 → nitrokey-0.4.2}/pyproject.toml +7 -4
  4. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/nk3/_device.py +2 -13
  5. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/nkpk.py +2 -13
  6. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/__init__.py +42 -0
  7. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_device.py +10 -1
  8. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/admin_app.py +1 -1
  9. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/updates.py +5 -4
  10. {nitrokey-0.4.0 → nitrokey-0.4.2}/LICENSES/Apache-2.0.txt +0 -0
  11. {nitrokey-0.4.0 → nitrokey-0.4.2}/LICENSES/MIT.txt +0 -0
  12. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/__init__.py +0 -0
  13. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/_helpers.py +0 -0
  14. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/nk3/__init__.py +0 -0
  15. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/nk3/_bootloader.py +0 -0
  16. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/nk3/secrets_app.py +0 -0
  17. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/py.typed +0 -0
  18. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_base.py +0 -0
  19. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/__init__.py +0 -0
  20. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55.py +0 -0
  21. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/README.md +0 -0
  22. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/__init__.py +0 -0
  23. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/__init__.py +0 -0
  24. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/certificate.py +0 -0
  25. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/hash.py +0 -0
  26. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/hmac.py +0 -0
  27. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/keys.py +0 -0
  28. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/symmetric.py +0 -0
  29. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/crypto/types.py +0 -0
  30. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/exceptions.py +0 -0
  31. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/__init__.py +0 -0
  32. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/commands.py +0 -0
  33. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/error_codes.py +0 -0
  34. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/exceptions.py +0 -0
  35. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/interfaces/__init__.py +0 -0
  36. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/interfaces/usb.py +0 -0
  37. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/mcuboot.py +0 -0
  38. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/memories.py +0 -0
  39. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/properties.py +0 -0
  40. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/__init__.py +0 -0
  41. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/base.py +0 -0
  42. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/bulk_protocol.py +0 -0
  43. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/misc.py +0 -0
  44. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/sb2/__init__.py +0 -0
  45. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/sb2/commands.py +0 -0
  46. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/sb2/headers.py +0 -0
  47. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/sb2/images.py +0 -0
  48. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/sbfile/sb2/sections.py +0 -0
  49. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/__init__.py +0 -0
  50. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/abstract.py +0 -0
  51. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/crypto/__init__.py +0 -0
  52. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/crypto/cert_blocks.py +0 -0
  53. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/crypto/rkht.py +0 -0
  54. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/exceptions.py +0 -0
  55. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/__init__.py +0 -0
  56. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/commands.py +0 -0
  57. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/__init__.py +0 -0
  58. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/base.py +0 -0
  59. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/usb_device.py +0 -0
  60. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/protocol/__init__.py +0 -0
  61. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/protocol/protocol_base.py +0 -0
  62. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/misc.py +0 -0
  63. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/lpc55_upload/utils/spsdk_enum.py +0 -0
  64. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52.py +0 -0
  65. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/README.md +0 -0
  66. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/__init__.py +0 -0
  67. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/__init__.py +0 -0
  68. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/dfu-cc.proto +0 -0
  69. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/dfu_cc_pb2.py +0 -0
  70. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/dfu_cc_pb2.pyi +0 -0
  71. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/dfu_transport.py +0 -0
  72. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/dfu_transport_serial.py +0 -0
  73. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/init_packet_pb.py +0 -0
  74. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/dfu/manifest.py +0 -0
  75. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/exceptions.py +0 -0
  76. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/__init__.py +0 -0
  77. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/device_lister.py +0 -0
  78. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/enumerated_device.py +0 -0
  79. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/lister_backend.py +0 -0
  80. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/unix/__init__.py +0 -0
  81. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/unix/unix_lister.py +0 -0
  82. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/windows/__init__.py +0 -0
  83. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/windows/constants.py +0 -0
  84. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/windows/lister_win32.py +0 -0
  85. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_bootloader/nrf52_upload/lister/windows/structures.py +0 -0
  86. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_exceptions.py +0 -0
  87. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/_utils.py +0 -0
  88. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/trussed/provisioner_app.py +0 -0
  89. {nitrokey-0.4.0 → nitrokey-0.4.2}/src/nitrokey/updates.py +0 -0
@@ -1,23 +1,25 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: nitrokey
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Nitrokey Python SDK
5
- License: Apache-2.0 or MIT
5
+ License-Expression: Apache-2.0 OR MIT
6
+ License-File: LICENSES/Apache-2.0.txt
7
+ License-File: LICENSES/MIT.txt
6
8
  Author: Nitrokey
7
9
  Author-email: pypi@nitrokey.com
8
10
  Requires-Python: >=3.10, <4
9
11
  Classifier: Intended Audience :: Developers
10
- Classifier: License :: Other/Proprietary License
11
12
  Classifier: Programming Language :: Python :: 3
12
13
  Classifier: Programming Language :: Python :: 3.10
13
14
  Classifier: Programming Language :: Python :: 3.11
14
15
  Classifier: Programming Language :: Python :: 3.12
15
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
16
18
  Requires-Dist: crcmod (>=1.7,<2)
17
19
  Requires-Dist: cryptography (>=41)
18
20
  Requires-Dist: fido2 (>=1.1.2,<3)
19
21
  Requires-Dist: hidapi (>=0.14,<0.15)
20
- Requires-Dist: protobuf (>=5.26,<6)
22
+ Requires-Dist: protobuf (>=5.26,<7)
21
23
  Requires-Dist: pyserial (>=3.5,<4)
22
24
  Requires-Dist: requests (>=2.16,<3)
23
25
  Requires-Dist: semver (>=3,<4)
@@ -63,13 +65,10 @@ The releases are also available as [signed tags][releases] in the GitHub reposit
63
65
  ## Getting Started
64
66
 
65
67
  ```python
66
- from nitrokey.nk3 import NK3
67
- from nitrokey.nkpk import NKPK
68
+ import nitrokey.trussed
68
69
 
69
70
  print("Connected Nitrokey devices:")
70
- for device in NK3.list():
71
- print(f"- {device.name} at {device.path}")
72
- for device in NKPK.list():
71
+ for device in nitrokey.trussed.list():
73
72
  print(f"- {device.name} at {device.path}")
74
73
  ```
75
74
 
@@ -36,13 +36,10 @@ The releases are also available as [signed tags][releases] in the GitHub reposit
36
36
  ## Getting Started
37
37
 
38
38
  ```python
39
- from nitrokey.nk3 import NK3
40
- from nitrokey.nkpk import NKPK
39
+ import nitrokey.trussed
41
40
 
42
41
  print("Connected Nitrokey devices:")
43
- for device in NK3.list():
44
- print(f"- {device.name} at {device.path}")
45
- for device in NKPK.list():
42
+ for device in nitrokey.trussed.list():
46
43
  print(f"- {device.name} at {device.path}")
47
44
  ```
48
45
 
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "nitrokey"
7
- version = "0.4.0"
7
+ version = "0.4.2"
8
8
  description = "Nitrokey Python SDK"
9
9
  authors = [
10
10
  { name = "Nitrokey", email = "pypi@nitrokey.com" },
@@ -29,7 +29,7 @@ dependencies = [
29
29
  "hidapi >=0.14, <0.15",
30
30
 
31
31
  # nrf52
32
- "protobuf >=5.26, <6",
32
+ "protobuf >=5.26, <7",
33
33
  "pyserial >=3.5, <4",
34
34
  ]
35
35
 
@@ -52,7 +52,7 @@ isort = "^5.13.2"
52
52
  mypy = "^1.4"
53
53
  rstcheck = { version = "^6", extras = ["sphinx"] }
54
54
  sphinx = "^7"
55
- types-protobuf = "^5.26"
55
+ types-protobuf = ">=5.26, <7"
56
56
  types-requests = "^2.16"
57
57
  typing-extensions = "^4.1"
58
58
 
@@ -61,7 +61,7 @@ dev-dependencies = [
61
61
  # These dependencies are required for running the type checks.
62
62
  "fake-winreg >=1.6, <2",
63
63
  "mypy >=1.4, <2",
64
- "types-protobuf >=5.26, <6",
64
+ "types-protobuf >=5.26, <7",
65
65
  "types-requests >=2.16, <3",
66
66
 
67
67
  # These additional lower bounds are required for --resolution lowest.
@@ -69,6 +69,9 @@ dev-dependencies = [
69
69
  "cffi >=1.14.1",
70
70
  "typing-extensions >=4.1",
71
71
  "urllib3 >= 2",
72
+
73
+ # fake-winreg does not work with wrapt v2 so we need to add an additional upper bound
74
+ "wrapt <2",
72
75
  ]
73
76
 
74
77
  [tool.black]
@@ -7,7 +7,7 @@
7
7
 
8
8
  from typing import List
9
9
 
10
- from fido2.hid import CtapHidDevice, list_descriptors, open_device
10
+ from fido2.hid import CtapHidDevice
11
11
 
12
12
  from nitrokey import _VID_NITROKEY
13
13
  from nitrokey.trussed import Fido2Certs, Model, TrussedDevice, Version
@@ -58,15 +58,4 @@ class NK3(TrussedDevice):
58
58
  def list(cls) -> List["NK3"]:
59
59
  from . import _PID_NK3_DEVICE
60
60
 
61
- descriptors = [
62
- desc
63
- for desc in list_descriptors() # type: ignore
64
- if desc.vid == _VID_NITROKEY and desc.pid == _PID_NK3_DEVICE
65
- ]
66
-
67
- devices = []
68
-
69
- # iterate on all descriptors found and open the device
70
- for desc in descriptors:
71
- devices.append(cls.from_device(open_device(desc.path)))
72
- return devices
61
+ return cls._list_vid_pid(_VID_NITROKEY, _PID_NK3_DEVICE)
@@ -7,7 +7,7 @@
7
7
 
8
8
  from typing import List, Optional, Sequence, Union
9
9
 
10
- from fido2.hid import CtapHidDevice, list_descriptors, open_device
10
+ from fido2.hid import CtapHidDevice
11
11
 
12
12
  from nitrokey import _VID_NITROKEY
13
13
  from nitrokey.trussed import Fido2Certs, TrussedDevice, Version
@@ -67,18 +67,7 @@ class NKPK(TrussedDevice):
67
67
 
68
68
  @classmethod
69
69
  def list(cls) -> List["NKPK"]:
70
- descriptors = [
71
- desc
72
- for desc in list_descriptors() # type: ignore
73
- if desc.vid == _VID_NITROKEY and desc.pid == _PID_NKPK_DEVICE
74
- ]
75
-
76
- devices = []
77
-
78
- # iterate on all descriptors found and open the device
79
- for desc in descriptors:
80
- devices.append(cls.from_device(open_device(desc.path)))
81
- return devices
70
+ return cls._list_vid_pid(_VID_NITROKEY, _PID_NKPK_DEVICE)
82
71
 
83
72
 
84
73
  class NKPKBootloader(TrussedBootloaderNrf52):
@@ -5,6 +5,8 @@
5
5
  # http://opensource.org/licenses/MIT>, at your option. This file may not be
6
6
  # copied, modified, or distributed except according to those terms.
7
7
 
8
+ from typing import List, Optional
9
+
8
10
  from ._base import Model as Model # noqa: F401
9
11
  from ._base import TrussedBase as TrussedBase # noqa: F401
10
12
  from ._bootloader import FirmwareContainer as FirmwareContainer # noqa: F401
@@ -19,3 +21,43 @@ from ._exceptions import TrussedException as TrussedException # noqa: F401
19
21
  from ._utils import Fido2Certs as Fido2Certs # noqa: F401
20
22
  from ._utils import Uuid as Uuid # noqa: F401
21
23
  from ._utils import Version as Version # noqa: F401
24
+
25
+
26
+ def list(*, model: Optional[Model] = None) -> List[TrussedBase]:
27
+ devices: List[TrussedBase] = []
28
+
29
+ if model is None or model == Model.NK3:
30
+ from nitrokey import nk3
31
+
32
+ devices.extend(nk3.list())
33
+
34
+ if model is None or model == Model.NKPK:
35
+ from nitrokey import nkpk
36
+
37
+ devices.extend(nkpk.list())
38
+
39
+ return devices
40
+
41
+
42
+ def open(path: str, *, model: Optional[Model] = None) -> Optional[TrussedBase]:
43
+ devices: List[TrussedBase] = []
44
+
45
+ if model is None or model == Model.NK3:
46
+ from nitrokey import nk3
47
+
48
+ nk3_device = nk3.open(path)
49
+ if nk3_device is not None:
50
+ devices.append(nk3_device)
51
+
52
+ if model is None or model == Model.NKPK:
53
+ from nitrokey import nkpk
54
+
55
+ nkpk_device = nkpk.open(path)
56
+ if nkpk_device is not None:
57
+ devices.append(nkpk_device)
58
+
59
+ if len(devices) > 1:
60
+ raise Exception(f"Found multiple devices at path {path}")
61
+ if len(devices) == 1:
62
+ return devices[0]
63
+ return None
@@ -13,7 +13,7 @@ from abc import abstractmethod
13
13
  from enum import Enum
14
14
  from typing import List, Optional, Sequence, TypeVar, Union
15
15
 
16
- from fido2.hid import CtapHidDevice, open_device
16
+ from fido2.hid import CtapHidDevice, list_descriptors, open_device
17
17
 
18
18
  from ._base import TrussedBase
19
19
  from ._utils import Fido2Certs, Uuid
@@ -113,6 +113,15 @@ class TrussedDevice(TrussedBase):
113
113
  @abstractmethod
114
114
  def list(cls: type[T]) -> List[T]: ...
115
115
 
116
+ @classmethod
117
+ def _list_vid_pid(cls: type[T], vid: int, pid: int) -> List[T]:
118
+ descriptors = [
119
+ desc
120
+ for desc in list_descriptors() # type: ignore
121
+ if desc.vid == vid and desc.pid == pid
122
+ ]
123
+ return [cls.from_device(open_device(desc.path)) for desc in descriptors]
124
+
116
125
 
117
126
  def _device_path_to_str(path: Union[bytes, str]) -> str:
118
127
  """
@@ -170,7 +170,7 @@ class ConfigFieldType(Enum):
170
170
  elif self == ConfigFieldType.U8:
171
171
  try:
172
172
  intval = int(value)
173
- if intval < 256 and intval > 0:
173
+ if intval < 256 and intval >= 0:
174
174
  return True
175
175
  else:
176
176
  return False
@@ -62,7 +62,7 @@ class Warning(enum.Enum):
62
62
  return (
63
63
  "Not enough space on the internal filesystem to perform the firmware"
64
64
  " update. See the release notes for more information:"
65
- " https://github.com/Nitrokey/nitrokey-3-firmware/releases/tag/v1.8.2-test.20250312"
65
+ " https://github.com/Nitrokey/nitrokey-3-firmware/releases/tag/v1.8.2"
66
66
  )
67
67
  if self == Warning.MISSING_STATUS:
68
68
  return (
@@ -285,8 +285,8 @@ class Updater:
285
285
  def update(
286
286
  self,
287
287
  device: TrussedBase,
288
- image: Optional[str],
289
- update_version: Optional[str],
288
+ image: Optional[str] = None,
289
+ update_version: Optional[str] = None,
290
290
  ignore_pynitrokey_version: bool = False,
291
291
  ) -> Tuple[Version, Status]:
292
292
  model = device.model
@@ -547,7 +547,8 @@ class Updater:
547
547
  raise self.ui.error(str(e))
548
548
 
549
549
  txt = _get_extra_information(migrations)
550
- self.ui.confirm_extra_information(txt)
550
+ if len(txt) > 0:
551
+ self.ui.confirm_extra_information(txt)
551
552
 
552
553
  if _Migration.IFS_MIGRATION_V2 in migrations:
553
554
  if status and status.ifs_blocks is not None and status.ifs_blocks < 5:
File without changes
File without changes