From c2355b51f849bb8fd5ffece31a738fe03def58fd Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 13 Dec 2017 11:03:27 +0100
Subject: [PATCH] Hashing Tool: include tyres in integrity checks

---
 .../ViewModel/UserControl/ManufacturerReportXMLFile.cs   | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs b/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs
index b1dcad74f1..d6adf8d548 100644
--- a/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs
+++ b/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs
@@ -103,7 +103,6 @@ namespace HashingTool.ViewModel.UserControl
 					if (entry.Component.StartsWith("Axle ")) {
 						entry.Component = entry.Component.Replace("Axle", "Tyre");
 						entry.CertificationNumber = ReadElementValue(node, XMLNames.Report_Tyre_TyreCertificationNumber);
-						entry.DigestValue = "Not Available";
 					} else {
 						entry.CertificationNumber = ReadElementValue(node, XMLNames.Report_Component_CertificationNumber) ??
 													ReadElementValue(node, XMLNames.Report_Component_CertificationMethod);
@@ -116,9 +115,7 @@ namespace HashingTool.ViewModel.UserControl
 					if (!jobComponent.Any()) {
 						continue;
 					}
-					entry.DigestValueMatchesJobComponent = entry.Component.StartsWith("Tyre ")
-						? (bool?)null
-						: (jobComponent.First().DigestValueComputed == entry.DigestValue);
+					entry.DigestValueMatchesJobComponent = jobComponent.First().DigestValueComputed == entry.DigestValue;
 					entry.DigestValueExpected = jobComponent.First().DigestValueComputed;
 
 					if (entry.CertificationMethod == CertificationMethod.StandardValues.ToXMLFormat()) {
@@ -134,9 +131,7 @@ namespace HashingTool.ViewModel.UserControl
 			var certificationNumberMismatch =
 				componentData.Where(
 					x => x.CertificationNumberMatchesJobComponent != null && !x.CertificationNumberMatchesJobComponent.Value).ToArray();
-			var digestMismatch =
-				componentData.Where(x => !x.Component.StartsWith("Tyre "))
-					.Where(x => x.DigestValueMatchesJobComponent == null || !x.DigestValueMatchesJobComponent.Value).ToArray();
+			var digestMismatch = componentData.Where(x => x.DigestValueMatchesJobComponent == null || !x.DigestValueMatchesJobComponent.Value).ToArray();
 			if (jobComponents.Any()) {
 				foreach (var entry in certificationNumberMismatch) {
 					_validationErrors.Add(
-- 
GitLab