public XAdESSignedXml SetSignatureInfo() { // Set nodes identifiers this.Signature.Id = XsdSchemas.FormatId("Signature"); this.SignedInfo.Id = XsdSchemas.FormatId("Signature", "SignedInfo"); return(this); }
public static SignedPropertiesType CreateSignedProperties(this QualifyingPropertiesType qualifyingProperties , XAdESSignedXml signedXml) { qualifyingProperties.SignedProperties = new SignedPropertiesType { Id = XsdSchemas.FormatId(signedXml.Signature.Id, "SignedProperties") }; return(qualifyingProperties.SignedProperties); }
public Reference SetSignatureTransformReference() { Reference reference = new Reference(String.Empty); reference.Id = XsdSchemas.FormatId("Reference", "ID-"); reference.AddTransform(new XmlDsigEnvelopedSignatureTransform()); this.AddReference(reference); return(reference); }
private XAdESSignedXml SetSignatureDataObject(QualifyingPropertiesType qualifyingProperties) { var document = qualifyingProperties.ToXmlDocument(); var nsMgr = XsdSchemas.CreateXadesNamespaceManager(document); var dataObject = new DataObject(); dataObject.Id = XsdSchemas.FormatId(this.Signature.Id, "Object"); dataObject.Data = document.DocumentElement.SelectNodes(".", nsMgr); this.AddObject(dataObject); return(this); }
private XAdESSignedXml SetSignedPropertiesReference(SignedPropertiesType signedProperties) { var reference = new Reference { Id = XsdSchemas.FormatId("SignedPropertiesID") , Uri = String.Format("#{0}", signedProperties.Id) , Type = "http://uri.etsi.org/01903#SignedProperties" }; this.AddReference(reference); return(this); }
public XAdESSignedXml SetKeyInfo(X509Certificate certificate, RSA key) { this.KeyInfo = new KeyInfo(); this.KeyInfo.Id = XsdSchemas.FormatId("Certificate"); this.KeyInfo.AddClause(new KeyInfoX509Data(certificate)); this.KeyInfo.AddClause(new RSAKeyValue(key)); this.AddReference(new Reference { Uri = String.Format("#{0}", this.KeyInfo.Id) }); return(this); }