<!-- DO NOT TEMPLATE this check. dracut-fips-aesni should only be installed on
 certified systems, and changes to this file should be scrutinized through the
 review process.
-->
<def-group>
  <definition class="compliance" id="package_dracut-fips-aesni_installed"
  version="1">
    {{{ oval_metadata("The RPM package dracut-fips-aesni should be installed.") }}}
    <criteria operator="OR">
      <criterion comment="System does not support AES instruction set" test_ref="test_processor_aes_instruction" />
      <criteria operator="AND">
        <extend_definition comment="Installed OS is FIPS certified" definition_ref="installed_OS_is_FIPS_certified" />
        <criterion comment="package dracut-fips-aesni is installed"
        test_ref="test_package_dracut-fips-aesni_installed" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="query /proc/cpuinfo" id="test_processor_aes_instruction" version="1">
    <ind:object object_ref="object_processor_aes_instruction" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_processor_aes_instruction" version="1">
    <ind:filepath>/proc/cpuinfo</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*flags[\s]*:[\s]*.*aes.*$</ind:pattern>
    <ind:instance datatype="int" operation="equals">1</ind:instance>
  </ind:textfilecontent54_object>

  <linux:rpminfo_test check="all" check_existence="all_exist"
  id="test_package_dracut-fips-aesni_installed" version="1"
  comment="package dracut-fips-aesni is installed">
    <linux:object object_ref="obj_package_dracut-fips-aesni_installed" />
  </linux:rpminfo_test>
  <linux:rpminfo_object id="obj_package_dracut-fips-aesni_installed" version="1">
    <linux:name>dracut-fips-aesni</linux:name>
  </linux:rpminfo_object>
</def-group>
