mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 05:28:08 +00:00
67f3ac5103
tpmr reset now works for both TPM1 and TPM2; bring in TPM1 logic from tpm-reset. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
24 lines
443 B
Bash
Executable File
24 lines
443 B
Bash
Executable File
#!/bin/bash
|
|
. /etc/functions
|
|
|
|
echo '*****'
|
|
echo '***** WARNING: This will erase all keys and secrets from the TPM'
|
|
echo '*****'
|
|
|
|
read -s -p "New TPM owner password: " key_password
|
|
echo
|
|
|
|
if [ -z "$key_password" ]; then
|
|
die "Empty owner password is not allowed"
|
|
fi
|
|
|
|
read -s -p "Repeat owner password: " key_password2
|
|
echo
|
|
|
|
|
|
if [ "$key_password" != "$key_password2" ]; then
|
|
die "Key passwords do not match"
|
|
fi
|
|
|
|
tpmr reset "$key_password"
|