File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,13 +488,16 @@ tpm1_seal() {
488488 pcrf=" $4 "
489489 sealed_size=" $5 "
490490 pass=" $6 " # May be empty to seal with no password
491- tpm_password =" $7 " # Owner password - will prompt if needed and not empty
491+ tpm_owner_password =" $7 " # Owner password - will prompt if needed and not empty
492492
493493 sealed_file=" $SECRET_DIR /tpm1_seal_sealed.bin"
494494 at_exit cleanup_shred " $sealed_file "
495495
496496 POLICY_ARGS=()
497497
498+ DEBUG " tpm1_seal arguments: file=$file index=$index pcrl=$pcrl pcrf=$pcrf sealed_size=$sealed_size pass=$( mask_param " $pass " ) tpm_password=$( mask_param " $tpm_password " ) "
499+
500+
498501 # If a password was given, add it to the policy arguments
499502 if [ " $pass " ]; then
500503 POLICY_ARGS+=(-pwdd " $pass " )
@@ -516,7 +519,7 @@ tpm1_seal() {
516519 -of " $sealed_file " \
517520 -hk 40000000 \
518521 " ${POLICY_ARGS[@]} "
519-
522+
520523 # try it without the TPM Owner Password first
521524 if ! tpm nv_writevalue -in " $index " -if " $sealed_file " ; then
522525 # to create an nvram space we need the TPM Owner Password
@@ -530,7 +533,7 @@ tpm1_seal() {
530533 prompt_tpm_owner_password
531534
532535 tpm nv_definespace -in " $index " -sz " $sealed_size " \
533- -pwdo " $tpm_password " -per 0 ||
536+ -pwdo " $tpm_owner_password " -per 0 ||
534537 warn " Unable to define TPM NVRAM space; trying anyway"
535538
536539 tpm nv_writevalue -in " $index " -if " $sealed_file " ||
You can’t perform that action at this time.
0 commit comments