private X509CertificateStructure(
            Asn1Sequence seq)
        {
			if (seq.Count != 3)
				throw new ArgumentException("sequence wrong size for a certificate", "seq");

			//
            // correct x509 certficate
            //
			tbsCert = TbsCertificateStructure.GetInstance(seq[0]);
			sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
			sig = DerBitString.GetInstance(seq[2]);
        }
        private X509CertificateStructure(
            Asn1Sequence seq)
        {
            if (seq.Count != 3)
            {
                throw new ArgumentException("sequence wrong size for a certificate", "seq");
            }

            //
            // correct x509 certficate
            //
            tbsCert  = TbsCertificateStructure.GetInstance(seq[0]);
            sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
            sig      = DerBitString.GetInstance(seq[2]);
        }
		public X509CertificateStructure(
			TbsCertificateStructure	tbsCert,
			AlgorithmIdentifier		sigAlgID,
			DerBitString			sig)
		{
			if (tbsCert == null)
				throw new ArgumentNullException("tbsCert");
			if (sigAlgID == null)
				throw new ArgumentNullException("sigAlgID");
			if (sig == null)
				throw new ArgumentNullException("sig");

			this.tbsCert = tbsCert;
			this.sigAlgID = sigAlgID;
			this.sig = sig;
		}
        public X509CertificateStructure(
            TbsCertificateStructure tbsCert,
            AlgorithmIdentifier sigAlgID,
            DerBitString sig)
        {
            if (tbsCert == null)
            {
                throw new ArgumentNullException("tbsCert");
            }
            if (sigAlgID == null)
            {
                throw new ArgumentNullException("sigAlgID");
            }
            if (sig == null)
            {
                throw new ArgumentNullException("sig");
            }

            this.tbsCert  = tbsCert;
            this.sigAlgID = sigAlgID;
            this.sig      = sig;
        }
		private X509Certificate GenerateJcaObject(
			TbsCertificateStructure	tbsCert,
			byte[]					signature)
		{
			return new X509Certificate(
				new X509CertificateStructure(tbsCert, sigAlgId, new DerBitString(signature)));
		}