diff --git a/uefi_keys_generate_pk.sh b/uefi_keys_generate_pk.sh index be37ea3..7834efa 100755 --- a/uefi_keys_generate_pk.sh +++ b/uefi_keys_generate_pk.sh @@ -5,22 +5,8 @@ if [ -f PK-GUID ] && [ -f PK-vmpriv.key ] && [ -f PK-vm.crt ] && [ -f PK-vm.der [ -f db-vmpriv.key ] && [ -f db-vm.crt ] && [ -f db-vm.der ] && [ -f db-vm.esl ] && [ -f db-vm.auth ]; then echo "[*] Keys already generated as {PK,KEK,db}-vm{priv.key,.crt,.der,.esl,.auth}"; else + rm -f "{PK,KEK,db}-vm{priv.key,.crt,.der,.esl,.auth}"; rm -f PK-GUID; - rm -f PK-vm.der; - rm -f PK-vm.crt; - rm -f PK-vmpriv.key; - rm -f PK-vm.esl; - rm -f PK-vm.auth; - rm -f KEK-vm.der; - rm -f KEK-vm.crt; - rm -f KEK-vmpriv.key; - rm -f KEK-vm.esl; - rm -f KEK-vm.auth; - rm -f db-vm.der; - rm -f db-vm.crt; - rm -f db-vmpriv.key; - rm -f db-vm.esl; - rm -f db-vm.auth; uuidgen --random > PK-GUID; openssl req -config uefi_pk-openssl.cnf -newkey rsa:2048 -nodes -keyout PK-vmpriv.key -x509 -days 36500 -out PK-vm.crt; openssl x509 -in PK-vm.crt -outform der -out PK-vm.der;