nitrokey.trussed¶
Submodules
Objekte z vezanimi napravami¶
- class nitrokey.trussed.TrussedBase¶
Osnovni razred za naprave Nitrokey, ki uporabljajo ogrodje Trussed in uporabljajo vdelano programsko opremo ali zaganjalnik.
- abstract close()¶
- Vrne tip:
None
- abstract reboot()¶
- Vrne tip:
bool
- abstract property name: str¶
- abstract property path: str¶
- abstract property pid: int¶
- property vid: int¶
- class nitrokey.trussed.TrussedDevice¶
Osnove:
TrussedBase
- __init__(device, fido2_certs)¶
- Parametri:
device (CtapHidDevice)
fido2_certs (Sequence[Fido2Certs])
- Vrne tip:
None
- close()¶
- Vrne tip:
None
- abstract classmethod from_device(device)¶
- Parametri:
device (CtapHidDevice)
- Vrne tip:
T
- classmethod list()¶
- Vrne tip:
list[T]
- classmethod open(path)¶
- Parametri:
path (str)
- Vrne tip:
T | None
- reboot()¶
- Vrne tip:
bool
- wink()¶
- Vrne tip:
None
- property path: str¶
- class nitrokey.trussed.TrussedBootloader¶
Osnove:
TrussedBase
- abstract update(image, callback=None)¶
- Parametri:
image (bytes)
callback (Callable[[int, int], None] | None)
- Vrne tip:
None
Update Container Objects¶
- nitrokey.trussed.parse_firmware_image(variant, data, model)¶
- Parametri:
- Vrne tip:
- class nitrokey.trussed.FirmwareContainer¶
FirmwareContainer(version: nitrokey.trussed._utils.Version, pynitrokey: Optional[nitrokey.trussed._utils.Version], images: Dict[nitrokey.trussed._bootloader.Variant, bytes])
- __init__(version, pynitrokey, images)¶
- class nitrokey.trussed.FirmwareMetadata¶
FirmwareMetadata(version: Nitrokey.trussed._utils.Version, signed_by: Neobvezno[str] = None, signed_by_nitrokey: bool = False)
- __init__(version, signed_by=None, signed_by_nitrokey=False)¶
- Parametri:
version (Version)
signed_by (str | None)
signed_by_nitrokey (bool)
- Vrne tip:
None
- signed_by: str | None = None¶
- signed_by_nitrokey: bool = False¶
Uporabni predmeti¶
- class nitrokey.trussed.App¶
Osnove:
Enum
Ukazi CTAPHID, specifični za prodajalca, za aplikacije z vezano konstrukcijo.
- ADMIN = 114¶
- PROVISIONER = 113¶
- SECRETS = 112¶
- class nitrokey.trussed.Fido2Certs¶
Fido2Certs(start: nitrokey.trussed._utils.Version, hashe: list[str])
- static get(certs, version)¶
- Parametri:
certs (Sequence[Fido2Certs])
version (Version)
- Vrne tip:
Fido2Certs | None
- hashes: list[str]¶
- class nitrokey.trussed.Model¶
Osnove:
Enum
- NK3 = 'Nitrokey 3'¶
- NKPK = 'Nitrokey Passkey'¶
- property firmware_pattern: Pattern[str]¶
- property firmware_repository: Repository¶
- class nitrokey.trussed.Uuid¶
UUID of a Nitrokey Trussed device.
- __init__(value)¶
- Parametri:
value (int)
- Vrne tip:
None
- value: int¶
- class nitrokey.trussed.Version¶
Različica naprave Nitrokey Trussed po različici Semantic Versioning 2.0.0.
Nekateri viri informacij o različicah, in sicer različice, ki jih vračajo starejše naprave, in binarni programi vdelane programske opreme, ne vsebujejo komponente pred izdajo. Ti primeri so označeni z complete=False. Ta zastavica vpliva na primerjavo: Različica pred izdajo se upošteva le, če sta oba primerka različice popolna.
>>> Version(1, 0, 0) Version(major=1, minor=0, patch=0, pre=None, build=None) >>> Version.from_str("1.0.0") Version(major=1, minor=0, patch=0, pre=None, build=None) >>> Version.from_v_str("v1.0.0") Version(major=1, minor=0, patch=0, pre=None, build=None) >>> Version(1, 0, 0, "rc.1") Version(major=1, minor=0, patch=0, pre='rc.1', build=None) >>> Version.from_str("1.0.0-rc.1") Version(major=1, minor=0, patch=0, pre='rc.1', build=None) >>> Version.from_v_str("v1.0.0-rc.1") Version(major=1, minor=0, patch=0, pre='rc.1', build=None) >>> Version.from_v_str("v1.0.0-rc.1+git") Version(major=1, minor=0, patch=0, pre='rc.1', build='git')
- __init__(major, minor, patch, pre=None, build=None, complete=False)¶
- Parametri:
major (int)
minor (int)
patch (int)
pre (str | None)
build (str | None)
complete (bool)
- Vrne tip:
None
- core()¶
Vrne osnovni del te različice, tj. različico brez komponent za predizdajo in sestavo.
>>> Version(1, 0, 0).core() Version(major=1, minor=0, patch=0, pre=None, build=None) >>> Version(1, 0, 0, "rc.1").core() Version(major=1, minor=0, patch=0, pre=None, build=None) >>> Version(1, 0, 0, "rc.1", "git").core() Version(major=1, minor=0, patch=0, pre=None, build=None)
- Vrne tip:
- build: str | None = None¶
- complete: bool = False¶
- major: int¶
- minor: int¶
- patch: int¶
- pre: str | None = None¶
Trussed Exceptions¶
- class nitrokey.trussed.TrussedException¶
Osnove:
Exception
- class nitrokey.trussed.TimeoutException¶
Osnove:
TrussedException
- __init__()¶
- Vrne tip:
None