mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* DataObject.cs: New. Complete implementation. * DSAKeyValue.cs: New. Complete implementation. * KeyInfo.cs: New. Complete implementation. * KeyInfoClause.cs: New. Abstract class (complete). * KeyInfoName.cs: New. Complete implementation. * KeyInfoNode.cs: New. Complete implementation. * KeyInfoRetrievalMethod.cs: New. Complete implementation. * KeyInfoX509Data.cs: New. Complete implementation. * Reference.cs: New. Incomplete implementation. * RSAKeyValue.cs: New. Complete implementation. * Signature.cs: New. Almost complete implementation - returned XML isn't exactly like the MS implementation. * SignedInfo.cs: New. Complete except SignatureLength. * SignedXml.cs: New. Minimal implementation (only enveloped signatures). Still many TODO! * Transform.cs: New. Abstract class (complete). * TransformChain.cs: New. Complete implementation. * XmlDsigBase64Transform.cs: New. Stub + basic logic. * XmlDsigC14NTransform.cs: New. Stub + basic logic. * XmlDsigC14NWithCommentsTransform.cs: New. Stub + basic logic. * XmlDsigEnvelopedSignatureTransform.cs: New. Stub + basic logic. * XmlDsigXPathTransform.cs: New. Stub + basic logic. * XmlDsigXsltTransform.cs: New. Stub + basic logic. svn path=/trunk/mcs/; revision=9124
60 lines
1.3 KiB
C#
60 lines
1.3 KiB
C#
//
|
|
// KeyInfoRetrievalMethod.cs - KeyInfoRetrievalMethod implementation for XML Signature
|
|
//
|
|
// Author:
|
|
// Sebastien Pouliot ([email protected])
|
|
//
|
|
// (C) 2002 Motus Technologies Inc. (http://www.motus.com)
|
|
//
|
|
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace System.Security.Cryptography.Xml {
|
|
|
|
public class KeyInfoRetrievalMethod : KeyInfoClause {
|
|
|
|
protected string URI;
|
|
|
|
public KeyInfoRetrievalMethod () {}
|
|
|
|
public KeyInfoRetrievalMethod (string strUri)
|
|
{
|
|
URI = strUri;
|
|
}
|
|
|
|
public string Uri {
|
|
get { return URI; }
|
|
set { URI = value; }
|
|
}
|
|
|
|
public override XmlElement GetXml ()
|
|
{
|
|
StringBuilder sb = new StringBuilder ();
|
|
sb.Append ("<RetrievalElement ");
|
|
if (URI != null) {
|
|
sb.Append ("URI=\"");
|
|
sb.Append (URI);
|
|
sb.Append ("\" ");
|
|
}
|
|
sb.Append ("xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />");
|
|
|
|
XmlDocument doc = new XmlDocument ();
|
|
doc.LoadXml(sb.ToString ());
|
|
return doc.DocumentElement;
|
|
}
|
|
|
|
public override void LoadXml (XmlElement value)
|
|
{
|
|
if (value == null)
|
|
throw new ArgumentNullException ();
|
|
|
|
if ((value.LocalName == "RetrievalElement") && (value.NamespaceURI == "http://www.w3.org/2000/09/xmldsig#")) {
|
|
URI = value.Attributes["URI"].Value;
|
|
}
|
|
else
|
|
URI = ""; // not null - so we return URI="" as attribute !!!
|
|
}
|
|
}
|
|
|
|
} |