Blame tests/p_kernel/02_kernel_secureboot_signed.sh

859aef
#!/bin/bash
859aef
# This test will verify that grub2-efi is correctly signed with correct cert in the CA chain
859aef
859aef
t_Log "Running $0 -  Verifying that kernel is correctly signed with correct cert"
859aef
859aef
if [ "$centos_ver" = "7" ] ; then
859aef
  t_InstallPackage pesign 
859aef
  for kernel in $(rpm -q kernel --queryformat '%{version}-%{release}.%{arch}\n') 
859aef
    do
859aef
    t_log "Validating kernel $kernel ..."
859aef
    pesign --show-signature --in /boot/vmlinuz-${kernel}|grep -q 'Red Hat Inc.'
859aef
    t_CheckExitStatus $?
859aef
  done
859aef
else
859aef
  t_log "previous versions than CentOS 7 aren't using secureboot ... skipping"
859aef
  exit 0
859aef
fi
859aef