Skip to content

Commit

Permalink
Fixed null results on success in sig/hash algos
Browse files Browse the repository at this point in the history
  • Loading branch information
ic0ns committed Apr 3, 2018
1 parent 9eb8b96 commit 3c4c7ab
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/main/java/de/rub/nds/siwecos/tls/TlsScannerCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ public ScanResult reportToScanResult(SiteReport report) {
if (report.getProbeTypeList().contains(ProbeType.TLS_POODLE)) {
resultList.add(getTlsPoodleVulnerable(report));
}
//if (report.getProbeTypeList().contains(ProbeType.CVE20162107)) {
// resultList.add(getCve20162107Vulnerable(report));
//}
// if (report.getProbeTypeList().contains(ProbeType.CVE20162107)) {
// resultList.add(getCve20162107Vulnerable(report));
// }

int max = 100;
boolean hasError = false;
Expand Down Expand Up @@ -290,18 +290,23 @@ private TestResult getCertificateWeakHashFunction(SiteReport report) {
|| certReport.getSignatureAndHashAlgorithm().getHashAlgorithm() == HashAlgorithm.SHA1) {
hashAlgo = certReport.getSignatureAndHashAlgorithm().getHashAlgorithm().name();
certString = certReport.toString();
List<ValuePair> valuePairList = new LinkedList<>();
valuePairList.add(new ValuePair("HASH", hashAlgo));
valuePairList.add(new ValuePair("CERTIFICATE", certString));
messageList.add(new TranslateableMessage("HASH_ALGO", valuePairList));

break;
}
}
List<ValuePair> valuePairList = new LinkedList<>();
valuePairList.add(new ValuePair("HASH", hashAlgo));
valuePairList.add(new ValuePair("CERTIFICATE", certString));
messageList.add(new TranslateableMessage("HASH_ALGO", valuePairList));

}
boolean critical = false;
if (hashAlgo != null && hashAlgo.equals(HashAlgorithm.MD5.name())) {
critical = true;
}
if (messageList.isEmpty()) {
messageList = null;
}
if (critical) {
return new TestResult("CERTIFICATE_WEAK_HASH_FUNCTION",
report.getCertificateHasWeakHashAlgorithm() == null, null,
Expand Down

0 comments on commit 3c4c7ab

Please sign in to comment.