summaryrefslogtreecommitdiff
path: root/gentpm.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xgentpm.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/gentpm.sh b/gentpm.sh
index 5e2bf1b..f3af48d 100755
--- a/gentpm.sh
+++ b/gentpm.sh
@@ -105,12 +105,6 @@ keygen() {
_RUN openssl dgst -sha256 -sign $rsapriv -out $sig $policy
}
-verify() {
- _STEP "verifying signer key"
- _RUN tpm2_loadexternal -G rsa -C o -u $rsapub -c $rsactx -n $rsaname
- _RUN tpm2_verifysignature -c $rsactx -g sha256 -m $policy -s $sig -t $verif -f rsassa
-}
-
getkey() {
_RUN tpm2_startauthsession --policy-session -S $session
_RUN tpm2_policypcr -l $pcr -S $session
@@ -126,7 +120,9 @@ load() {
_RUN cp $policy /etc/tpm2/policy
_RUN cp $rsaname /etc/tpm2/rsaname
- _RUN cp $verif /etc/tpm2/verification
+ _RUN cp $rsapub /etc/tpm2/rsapub
+ _RUN cp $rsactx /etc/tpm2/rsactx
+ _RUN cp $sig /etc/tpm2/rsasig
_RUN printf "%s" "$pcr" > /etc/tpm2/pcr
_RUN printf "%s" "$keyloc" > /etc/tpm2/keyloc
@@ -156,7 +152,6 @@ all() {
reset
loadvars
keygen
- verify
load
crypt
cleanup