Ejemplo n.º 1
0
        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]);
        }
Ejemplo n.º 2
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;
        }