mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* DSAKeyValue.cs: New XML generation is commented. Old string technique did a better job to match MS implementation. * DataObject.cs: Replaced XML generation from StringBuilder to XmlElement. * KeyInfo.cs: Replaced XML generation from StringBuilder to XmlElement. * KeyInfoName.cs: Replaced XML generation from StringBuilder to XmlElement. * KeyInfoNode.cs: Replaced XML generation from StringBuilder to XmlElement. * KeyInfoRetrievalMethod.cs: Replaced XML generation from StringBuilder to XmlElement. * KeyInfoX509Data.cs: Replaced XML generation from StringBuilder to XmlElement. * RSAKeyValue.cs: New XML generation is commented. Old string technique did a better job to match MS implementation. * Reference.cs: Replaced XML generation from StringBuilder to XmlElement. * Signature.cs: Replaced XML generation from StringBuilder to XmlElement. * SignedInfo.cs: Replaced XML generation from StringBuilder to XmlElement. * SignedXml.cs: Replaced XML generation from StringBuilder to XmlElement. * Transform.cs: Replaced XML generation from StringBuilder to XmlElement. * XmlDsigEnvelopedSignatureTransform.cs: Added missing Algorithm URL. * XmlDsigXPathTransform.cs: Added missing Algorithm URL. * XmlSignature.cs: New. Private contants (construct similar to WSE). svn path=/trunk/mcs/; revision=12100
50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
//
|
|
// KeyInfoRetrievalMethod.cs - KeyInfoRetrievalMethod implementation for XML Signature
|
|
//
|
|
// Author:
|
|
// Sebastien Pouliot ([email protected])
|
|
//
|
|
// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
|
|
//
|
|
|
|
using System.Xml;
|
|
|
|
namespace System.Security.Cryptography.Xml {
|
|
|
|
public class KeyInfoRetrievalMethod : KeyInfoClause {
|
|
|
|
private string URI;
|
|
|
|
public KeyInfoRetrievalMethod () {}
|
|
|
|
public KeyInfoRetrievalMethod (string strUri)
|
|
{
|
|
URI = strUri;
|
|
}
|
|
|
|
public string Uri {
|
|
get { return URI; }
|
|
set { URI = value; }
|
|
}
|
|
|
|
public override XmlElement GetXml ()
|
|
{
|
|
XmlDocument document = new XmlDocument ();
|
|
XmlElement xel = document.CreateElement (XmlSignature.ElementNames.RetrievalMethod, XmlSignature.NamespaceURI);
|
|
if (URI != null)
|
|
xel.SetAttribute (XmlSignature.AttributeNames.URI, URI);
|
|
return xel;
|
|
}
|
|
|
|
public override void LoadXml (XmlElement value)
|
|
{
|
|
if (value == null)
|
|
throw new ArgumentNullException ();
|
|
|
|
if ((value.LocalName != XmlSignature.ElementNames.RetrievalMethod) || (value.NamespaceURI != XmlSignature.NamespaceURI))
|
|
URI = ""; // not null - so we return URI="" as attribute !!!
|
|
else
|
|
URI = value.Attributes [XmlSignature.AttributeNames.URI].Value;
|
|
}
|
|
}
|
|
} |