heads/initrd/bin/tpm-reset
Jonathon Hall 1f8c88a7eb
gui-init, tpm-reset: Enforce TPM password maximum length
TPM password must be 1-32 characters.  Loop if the password is not
valid or the repeated password doesn't match, so the user can try
again.

Move prompt_new_owner_password to functions and use in both gui-init
and tpm-reset.

Fixes #1336

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2023-03-13 13:34:40 -04:00

11 lines
183 B
Bash
Executable File

#!/bin/bash
. /etc/functions
echo '*****'
echo '***** WARNING: This will erase all keys and secrets from the TPM'
echo '*****'
prompt_new_owner_password
tpmr reset "$key_password"