This class includes the name of the server that has produced the referenced response (ResponderID element) and the time indication in the "ProducedAt" field of the referenced response (ProducedAt element). The optional URI attribute could serve to indicate where the OCSP response identified is archived.
Ejemplo n.º 1
0
        /// <summary>
        /// Load state from an XML element
        /// </summary>
        /// <param name="xmlElement">XML element containing new state</param>
        public void LoadXml(System.Xml.XmlElement xmlElement)
        {
            XmlNamespaceManager xmlNamespaceManager;
            XmlNodeList         xmlNodeList;

            if (xmlElement == null)
            {
                throw new ArgumentNullException("xmlElement");
            }

            xmlNamespaceManager = new XmlNamespaceManager(xmlElement.OwnerDocument.NameTable);
            xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

            xmlNodeList = xmlElement.SelectNodes("xsd:OCSPIdentifier", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                throw new CryptographicException("OCSPIdentifier missing");
            }
            this.ocspIdentifier = new OCSPIdentifier();
            this.ocspIdentifier.LoadXml((XmlElement)xmlNodeList.Item(0));

            xmlNodeList = xmlElement.SelectNodes("xsd:DigestAlgAndValue", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                this.digestAlgAndValue = null;
            }
            else
            {
                this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
                this.digestAlgAndValue.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public OCSPRef()
 {
     this.ocspIdentifier    = new OCSPIdentifier();
     this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
 }
Ejemplo n.º 3
0
		/// <summary>
		/// Default constructor
		/// </summary>
		public OCSPRef()
		{
			this.ocspIdentifier = new OCSPIdentifier();
			this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Load state from an XML element
		/// </summary>
		/// <param name="xmlElement">XML element containing new state</param>
		public void LoadXml(System.Xml.XmlElement xmlElement)
		{
			XmlNamespaceManager xmlNamespaceManager;
			XmlNodeList xmlNodeList;
			
			if (xmlElement == null)
			{
				throw new ArgumentNullException("xmlElement");
			}

			xmlNamespaceManager = new XmlNamespaceManager(xmlElement.OwnerDocument.NameTable);
			xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

			xmlNodeList = xmlElement.SelectNodes("xsd:OCSPIdentifier", xmlNamespaceManager);
			if (xmlNodeList.Count == 0)
			{
				throw new CryptographicException("OCSPIdentifier missing");
			}
			this.ocspIdentifier = new OCSPIdentifier();
			this.ocspIdentifier.LoadXml((XmlElement)xmlNodeList.Item(0));

			xmlNodeList = xmlElement.SelectNodes("xsd:DigestAlgAndValue", xmlNamespaceManager);
			if (xmlNodeList.Count == 0)
			{
				this.digestAlgAndValue = null;
			}
			else
			{
				this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
				this.digestAlgAndValue.LoadXml((XmlElement)xmlNodeList.Item(0));
			}
		}