Skip to content

Commit cde94aa

Browse files
authored
Merge pull request #129 from tls-attacker/alpacanamingfix
fixed npe in report
2 parents edab4c5 + 9efd5fd commit cde94aa

File tree

3 files changed

+924561
-1
lines changed

3 files changed

+924561
-1
lines changed

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/report/PrintingScheme.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ public static PrintingScheme getDefaultPrintingScheme(boolean useColors) {
343343

344344
private static TextEncoding getAlpacaTextEncoding() {
345345
HashMap<TestResult, String> textEncodingMap = new HashMap<>();
346+
textEncodingMap.put(TestResult.CANNOT_BE_TESTED, "cannot be tested");
346347
textEncodingMap.put(TestResult.COULD_NOT_TEST, "could not test");
347348
textEncodingMap.put(TestResult.ERROR_DURING_TEST, "error");
348349
textEncodingMap.put(TestResult.FALSE, "not mitigated");
@@ -351,6 +352,7 @@ private static TextEncoding getAlpacaTextEncoding() {
351352
textEncodingMap.put(TestResult.TRUE, "true");
352353
textEncodingMap.put(TestResult.UNCERTAIN, "uncertain");
353354
textEncodingMap.put(TestResult.UNSUPPORTED, "unsupported by tls-scanner");
355+
textEncodingMap.put(TestResult.PARTIALLY, "partially");
354356
return new TextEncoding(textEncodingMap);
355357
}
356358

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/report/TextEncoding.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public HashMap<TestResult, String> getTextEncodingMap() {
2828
}
2929

3030
public String encode(TestResult result) {
31-
return textEncodingMap.get(result);
31+
String string = textEncodingMap.get(result);
32+
if (string == null) {
33+
return result.name();
34+
} else {
35+
return string;
36+
}
3237
}
3338
}

0 commit comments

Comments
 (0)