Put signature into signed element
This commit is contained in:
@ -2,7 +2,6 @@
|
|||||||
using CryptoPro.Security.Cryptography.X509Certificates;
|
using CryptoPro.Security.Cryptography.X509Certificates;
|
||||||
using CryptoPro.Security.Cryptography.Xml;
|
using CryptoPro.Security.Cryptography.Xml;
|
||||||
using Hcs.Broker.Internal;
|
using Hcs.Broker.Internal;
|
||||||
using System.Security;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.ServiceModel;
|
using System.ServiceModel;
|
||||||
using System.ServiceModel.Channels;
|
using System.ServiceModel.Channels;
|
||||||
@ -146,8 +145,9 @@ namespace Hcs.Broker.Api.Request
|
|||||||
|
|
||||||
signedXml.ComputeXadesSignature();
|
signedXml.ComputeXadesSignature();
|
||||||
|
|
||||||
|
var element = doc.SelectNodes("//*[@Id='" + Constants.SIGNED_XML_ELEMENT_ID + "']")[0];
|
||||||
var xmlDigitalSignature = signedXml.GetXml();
|
var xmlDigitalSignature = signedXml.GetXml();
|
||||||
doc.DocumentElement.AppendChild(doc.ImportNode(xmlDigitalSignature, true));
|
element.AppendChild(doc.ImportNode(xmlDigitalSignature, true));
|
||||||
|
|
||||||
if (doc.FirstChild is XmlDeclaration)
|
if (doc.FirstChild is XmlDeclaration)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user