MCPcopy Create free account
hub / github.com/archlinux/archinstall / select_hsm

Function select_hsm

archinstall/lib/disk/encryption_menu.py:282–307  ·  view source on GitHub ↗
(preset: Fido2Device | None = None)

Source from the content-addressed store, hash-verified

280
281
282async def select_hsm(preset: Fido2Device | None = None) -> Fido2Device | None:
283 header = tr('Select a FIDO2 device to use for HSM') + '\n'
284
285 try:
286 fido_devices = Fido2.get_cryptenroll_devices()
287 except ValueError:
288 return None
289
290 if fido_devices:
291 group = MenuHelper(data=fido_devices).create_menu_group()
292
293 result = await Selection[Fido2Device](
294 group,
295 header=header,
296 allow_skip=True,
297 ).show()
298
299 match result.type_:
300 case ResultType.Reset:
301 return None
302 case ResultType.Skip:
303 return preset
304 case ResultType.Selection:
305 return result.get_value()
306
307 return None
308
309
310async def select_partitions_to_encrypt(

Callers

nothing calls this directly

Calls 6

trFunction · 0.90
MenuHelperClass · 0.90
create_menu_groupMethod · 0.80
showMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected