The element IssuerSerial contains the identifier of one of the certificates referenced in the sequence
示例#1
0
文件: Cert.cs 项目: ylepikhov/dssnet
        /// <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("ds", SignedXml.XmlDsigNamespaceUrl);
            xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

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

            xmlNodeList = xmlElement.SelectNodes("xsd:IssuerSerial", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                throw new CryptographicException("IssuerSerial missing");
            }
            this.issuerSerial = new IssuerSerial();
            this.issuerSerial.LoadXml((XmlElement)xmlNodeList.Item(0));
        }
示例#2
0
文件: Cert.cs 项目: ylepikhov/dssnet
 /// <summary>
 /// Default constructor
 /// </summary>
 public Cert()
 {
     this.certDigest   = new DigestAlgAndValueType("CertDigest");
     this.issuerSerial = new IssuerSerial();
 }
示例#3
0
文件: Cert.cs 项目: Gianluigi/dssnet
		/// <summary>
		/// Default constructor
		/// </summary>
		public Cert()
		{
			this.certDigest = new DigestAlgAndValueType("CertDigest");
			this.issuerSerial = new IssuerSerial();
		}
示例#4
0
文件: Cert.cs 项目: Gianluigi/dssnet
		/// <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("ds", SignedXml.XmlDsigNamespaceUrl);
			xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

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

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