Skip to content

Commit

Permalink
Show supported crypto in oscap --version output
Browse files Browse the repository at this point in the history
It will allow users to discover which hash algorithms are supported
by our probes.
  • Loading branch information
jan-cerny committed Jul 21, 2021
1 parent d7a800d commit 02a404b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/OVAL/probes/probe-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,21 @@ void probe_table_list(FILE *output)
fprintf(output, "%-14s", oval_family_get_text(oval_subtype_get_family(type)));
fprintf(output, "%-29s", oval_subtype_get_text(type));
fprintf(output, "probe_%s", oval_subtype_get_text(type));
#if (defined(OPENSCAP_ENABLE_MD5) && defined(OPENSCAP_ENABLE_SHA1))
if (type == OVAL_INDEPENDENT_FILE_HASH) {
fprintf(output, " (MD5, SHA-1)");
}
#endif
if (type == OVAL_INDEPENDENT_FILE_HASH58) {
fprintf(output, " (");
#ifdef OPENSCAP_ENABLE_MD5
fprintf(output, "MD5, ");
#endif
#ifdef OPENSCAP_ENABLE_SHA1
fprintf(output, "SHA-1, ");
#endif
fprintf(output, "SHA-224, SHA-256, SHA-384, SHA-512)");
}
fprintf(output, "\n");
entry++;
}
Expand Down

0 comments on commit 02a404b

Please sign in to comment.