Shrink uefi key generator cleaner.

This commit is contained in:
Captain ALM 2024-08-17 14:57:24 +01:00
parent b196609b9d
commit c50c0182d8
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -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;