<def-group>
  <definition class="compliance" id="{{{ rule_id }}}" version="1">
    {{{ oval_metadata("Ensure the SSH_USE_STRONG_RNG environment variable is exported in /etc/profile.d/cc-ssh-strong-rng.csh and is not overridden in /etc/profile", rule_title=rule_title) }}}
    <criteria comment="ssh client is configured to use strong entropy" operator="AND">
      <criterion comment="check configuration in /etc/profile.d/cc-ssh-strong-rng.csh" test_ref="test_ssh_client_strong_rng_csh" />
      <criterion comment="check that the configuration is not overridden in /etc/profile" test_ref="test_ssh_client_strong_rng_csh_not_overridden" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="check correct entropy configuration in /etc/profile.d/cc-ssh-strong-rng.csh" id="test_ssh_client_strong_rng_csh" version="1">
    <ind:object object_ref="obj_ssh_client_strong_rng_csh"/>
    <ind:state state_ref="state_ssh_client_strong_rng_csh" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_ssh_client_strong_rng_csh" version="1">
    <ind:filepath>/etc/profile.d/cc-ssh-strong-rng.csh</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*setenv[\s]+SSH_USE_STRONG_RNG[\s]+([\d]+)$</ind:pattern>
    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="check that the configuration is not overridden in /etc/profile" id="test_ssh_client_strong_rng_csh_not_overridden" version="1">
    <ind:object object_ref="obj_ssh_client_strong_rng_csh_not_overridden"/>
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_ssh_client_strong_rng_csh_not_overridden" version="1">
    <ind:filepath>/etc/profile</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*setenv[\s]+SSH_USE_STRONG_RNG.*$</ind:pattern>
    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_ssh_client_strong_rng_csh"
  version="1">
    <ind:subexpression datatype="int" operation="greater than or equal">32</ind:subexpression>
  </ind:textfilecontent54_state>

</def-group>
