Skip to content

Commit 35cd5f9

Browse files
committed
Add strength field to XML output for groups. #333
1 parent 44d098e commit 35cd5f9

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

‎Changelog‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
Version: 2.2.1
5+
Date : TBC
6+
Author : rbsec <robin@rbsec.net>
7+
Changes: The following are a list of changes
8+
> Add the "strength" field to the XML output for groups
9+
410
Version: 2.2.0
511
Date : 15/06/2025
612
Author : rbsec <robin@rbsec.net>

‎sslscan.c‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6046,16 +6046,23 @@ int testSupportedGroups(struct sslCheckOptions *options) {
60466046
}
60476047

60486048
char *bits_color = RESET;
6049-
if (group_bit_strength < 112)
6049+
char *strength;
6050+
if (group_bit_strength < 112) {
60506051
bits_color = COL_RED;
6051-
else if (group_bit_strength < 128)
6052+
strength = "weak";
6053+
}
6054+
else if (group_bit_strength < 128) {
60526055
bits_color = COL_YELLOW;
6053-
else
6056+
strength = "medium";
6057+
}
6058+
else {
60546059
bits_color = COL_GREEN;
6060+
strength = "good";
6061+
}
60556062

60566063
char *printable_TLS_name = getPrintableTLSName(tls_version);
60576064
printf("%s %s%d%s bits %s%s%s\n", printable_TLS_name, bits_color, group_bit_strength, RESET, color, group_name, RESET);
6058-
printf_xml(" <group sslversion=\"%s\" bits=\"%d\" name=\"%s\" id=\"0x%04x\" />\n", printable_TLS_name, group_bit_strength, group_name, group_id);
6065+
printf_xml(" <group sslversion=\"%s\" bits=\"%d\" name=\"%s\" id=\"0x%04x\" strength=\"%s\" />\n", printable_TLS_name, group_bit_strength, group_name, group_id, strength);
60596066
}
60606067
}
60616068

0 commit comments

Comments
 (0)