Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit c2355b51 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Hashing Tool: include tyres in integrity checks

parent da3e090e
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment