Example #1
0
 private X509CertificateStructure(Asn1Sequence seq)
 {
     if (seq.Count != 3)
     {
         throw new ArgumentException("sequence wrong size for a certificate", "seq");
     }
     this.tbsCert  = TbsCertificateStructure.GetInstance(seq[0]);
     this.sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
     this.sig      = DerBitString.GetInstance(seq[2]);
 }
Example #2
0
 private X509CertificateStructure(Asn1Sequence seq)
 {
     //IL_0019: Unknown result type (might be due to invalid IL or missing references)
     if (seq.Count != 3)
     {
         throw new ArgumentException("sequence wrong size for a certificate", "seq");
     }
     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;
        }
        internal X509CertificateStructure(
            Asn1Sequence seq)
        {
            if (seq.Count != 3)
            {
                throw new ArgumentException("sequence wrong size for a certificate", "seq");
            }

            this.seq = seq;

            //
            // correct x509 certficate
            //
            tbsCert  = TbsCertificateStructure.GetInstance(seq[0]);
            sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
            sig      = DerBitString.GetInstance(seq[2]);
        }
Example #6
0
 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;
 }
Example #7
0
 public X509CertificateStructure(TbsCertificateStructure tbsCert, AlgorithmIdentifier sigAlgID, DerBitString sig)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     //IL_002a: Unknown result type (might be due to invalid IL or missing references)
     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 static TbsCertificateStructure GetInstance(Asn1TaggedObject obj, bool explicitly)
 {
     return(TbsCertificateStructure.GetInstance(Asn1Sequence.GetInstance(obj, explicitly)));
 }
		private X509Certificate GenerateJcaObject(
			TbsCertificateStructure	tbsCert,
			AlgorithmIdentifier     sigAlg,
			byte[]					signature)
		{
			return new X509Certificate(
				new X509CertificateStructure(tbsCert, sigAlg, new DerBitString(signature)));
		}
        private X509Certificate GenerateJcaObject(
			TbsCertificateStructure	tbsCert,
			byte[]					signature)
        {
            return new X509Certificate(
                new X509CertificateStructure(
                    new DerSequence(tbsCert, sigAlgId, new DerBitString(signature))));
        }