bstinson / centos / t_functional

Forked from centos/t_functional 3 years ago
Clone

Blame tests/p_grub2/01_grub2_secureboot_signed.sh

25c93a
#!/bin/bash
25c93a
# This test will verify that grub2-efi is correctly signed with correct cert in the CA chain
25c93a
25c93a
t_Log "Running $0 -  Verifying that grub2-efi is correctly signed with correct cert"
25c93a
9a1e76
arch=$(uname -m)
9a1e76
9a1e76
if [[ "$centos_ver" = "7" && "$arch" = "x86_64" ]] ; then
25c93a
  t_InstallPackage pesign grub2-efi
a59265
  pesign --show-signature --in /boot/efi/EFI/centos/grubx64.efi|grep -q 'Red Hat Inc.'
9bd632
  t_CheckExitStatus $?
25c93a
else
9a1e76
  t_Log "previous versions than CentOS 7 - or not x86_64 arch - aren't using secureboot ... skipping"
25c93a
  exit 0
25c93a
fi
25c93a