nitrokey.nk3.updates

class nitrokey.nk3.updates.UpdatePath

Baser: Enum

classmethod create(variant, current, new)
Parametre:
Returtype:

UpdatePath

default = 1
nRF_IFS_Migration_v1_3 = 2
class nitrokey.nk3.updates.UpdateUi

Baser: ABC

abstract abort(*msgs)
Parametre:

msgs (Any)

Returtype:

Exception

abstract abort_downgrade(current, image)
Parametre:
Returtype:

Exception

abstract abort_pynitrokey_version(current, required)
Parametre:
Returtype:

Exception

abstract confirm_download(current, new)
Parametre:
Returtype:

None

abstract confirm_extra_information(extra_info)
Parametre:

extra_info (List[str])

Returtype:

None

abstract confirm_pynitrokey_version(current, required)
Parametre:
Returtype:

None

abstract confirm_update(current, new)
Parametre:
Returtype:

None

abstract confirm_update_same_version(version)
Parametre:

version (Version)

Returtype:

None

abstract download_progress_bar(desc)
Parametre:

desc (str)

Returtype:

Iterator[Callable[[int, int], None]]

abstract error(*msgs)
Parametre:

msgs (Any)

Returtype:

Exception

abstract finalization_progress_bar()
Returtype:

Iterator[Callable[[int, int], None]]

abstract pre_bootloader_hint()
Returtype:

None

abstract request_bootloader_confirmation()
Returtype:

None

request_repeated_update()
Returtype:

Exception | None

abstract update_progress_bar()
Returtype:

Iterator[Callable[[int, int], None]]

class nitrokey.nk3.updates.Updater

Baser: object

__init__(ui, await_bootloader, await_device)
Parametre:
  • ui (UpdateUi)

  • await_bootloader (Callable[[], NK3Bootloader])

  • await_device (Callable[[int | None, Callable[[int, int], None] | None], NK3])

Returtype:

None

update(device, image, update_version, ignore_pynitrokey_version=False)
Parametre:
  • device (TrussedBase)

  • image (str | None)

  • update_version (str | None)

  • ignore_pynitrokey_version (bool)

Returtype:

Version

nitrokey.nk3.updates.get_extra_information(upath)

Returner yderligere oplysninger om enheden efter opdatering baseret på opdateringsstien

Parametre:

upath (UpdatePath)

Returtype:

List[str]

nitrokey.nk3.updates.get_finalization_wait_retries(upath)

Returnerer antal forsøg på at vente på enheden efter opdatering baseret på opdateringssti

Parametre:

upath (UpdatePath)

Returtype:

int

nitrokey.nk3.updates.get_firmware_update(release)
Parametre:

release (Release)

Returtype:

Asset