From 0f62d88e45687e156385705c437513b10c20a4a9 Mon Sep 17 00:00:00 2001 From: Harald Martini <harald.martini@student.tugraz.at> Date: Wed, 1 Jun 2022 15:28:54 +0200 Subject: [PATCH] added CreateDummySig method to MockupDeclarationPrimaryReport --- .../XMLDeclarationMockupPrimaryReport.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/VectoMockup/VectoMockup/Reports/XMLDeclarationMockupPrimaryReport.cs b/VectoMockup/VectoMockup/Reports/XMLDeclarationMockupPrimaryReport.cs index bf6fec9c28..d3fd01c0c5 100644 --- a/VectoMockup/VectoMockup/Reports/XMLDeclarationMockupPrimaryReport.cs +++ b/VectoMockup/VectoMockup/Reports/XMLDeclarationMockupPrimaryReport.cs @@ -1,4 +1,6 @@ using System.Linq; +using System.Xml.Linq; +using TUGraz.VectoCommon.Resources; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.OutputData.XML; @@ -56,13 +58,27 @@ namespace TUGraz.VectoMockup.Reports (ManufacturerRpt as IXMLMockupReport).WriteMockupSummary(Results.First()); (PrimaryReport as IXMLMockupReport).WriteMockupSummary(Results.First()); ManufacturerRpt.GenerateReport(); - var fullReportHash = GetSignature(ManufacturerRpt.Report); + var fullReportHash = CreateDummySig(); //CustomerRpt.GenerateReport(fullReportHash); PrimaryReport.GenerateReport(fullReportHash); } + protected virtual XElement CreateDummySig() + { + XNamespace di = "http://www.w3.org/2000/09/xmldsig#"; + return new XElement( + di + XMLNames.DI_Signature_Reference, + new XElement( + di + XMLNames.DI_Signature_Reference_DigestMethod, + new XAttribute(XMLNames.DI_Signature_Algorithm_Attr, "null")), + new XElement(di + XMLNames.DI_Signature_Reference_DigestValue, "NOT AVAILABLE") + ); + } + } + + + #endregion - } } \ No newline at end of file -- GitLab