This class includes the issuer (Issuer element), the time when the CRL was issued (IssueTime element) and optionally the number of the CRL (Number element). The Identifier element can be dropped if the CRL could be inferred from other information. Its URI attribute could serve to indicate where the identified CRL is archived.
Exemplo 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:DigestAlgAndValue", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                throw new CryptographicException("DigestAlgAndValue missing");
            }
            this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
            this.digestAlgAndValue.LoadXml((XmlElement)xmlNodeList.Item(0));

            xmlNodeList = xmlElement.SelectNodes("xsd:CRLIdentifier", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                this.crlIdentifier = null;
            }
            else
            {
                this.crlIdentifier = new CRLIdentifier();
                this.crlIdentifier.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public CRLRef()
 {
     this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
     this.crlIdentifier = new CRLIdentifier();
 }
Exemplo n.º 3
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:DigestAlgAndValue", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                throw new CryptographicException("DigestAlgAndValue missing");
            }
            this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
            this.digestAlgAndValue.LoadXml((XmlElement)xmlNodeList.Item(0));

            xmlNodeList = xmlElement.SelectNodes("xsd:CRLIdentifier", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                this.crlIdentifier = null;
            }
            else
            {
                this.crlIdentifier = new CRLIdentifier();
                this.crlIdentifier.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public CRLRef()
 {
     this.digestAlgAndValue = new DigestAlgAndValueType("DigestAlgAndValue");
     this.crlIdentifier     = new CRLIdentifier();
 }