{{%- set parameter = "RekeyLimit" %}} {{%- set sshd_config_path = "/etc/ssh/sshd_config" %}} {{%- set sshd_config_dir = "/etc/ssh/sshd_config.d" -%}} {{%- set description = "Ensure " ~ parameter ~ " is configured with the appropriate value in " ~ sshd_config_path %}} {{%- if sshd_distributed_config == "true" %}} {{%- set description = description ~ " or in " ~ sshd_config_dir -%}} {{%- endif %}}

{{{ oval_metadata(description) }}} {{{- application_not_required_or_requirement_unset() }}} {{{- application_required_or_requirement_unset() }}} {{{- oval_line_in_file_criterion(sshd_config_path, parameter) }}} {{%- if sshd_distributed_config == "true" %}} {{{- oval_line_in_directory_criterion(sshd_config_dir, parameter) | indent(8) }}} {{%- endif %}}
{{{ sshd_config_path }}}
^[\s]*{{{ parameter }}}[\s]+(.*)$
1

{{%- if sshd_distributed_config == "true" %}}

{{{ sshd_config_dir}}}
.*\.conf$
^[\s]*{{{ parameter }}}[\s]+(.*)$
1
{{%- endif %}}

^
[\s]+
[\s]*$