예제 #1
0
        /**
         * Constructor from Asn1Sequence
         */
        private IssuingDistributionPoint(
            Asn1Sequence seq)
        {
            this.seq = seq;

            for (int i = 0; i != seq.Count; i++)
            {
                Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[i]);

                switch (o.TagNo)
                {
                case 0:
                    // CHOICE so explicit
                    _distributionPoint = DistributionPointName.GetInstance(o, true);
                    break;

                case 1:
                    _onlyContainsUserCerts = DerBoolean.GetInstance(o, false).IsTrue;
                    break;

                case 2:
                    _onlyContainsCACerts = DerBoolean.GetInstance(o, false).IsTrue;
                    break;

                case 3:
                    _onlySomeReasons = new ReasonFlags(ReasonFlags.GetInstance(o, false));
                    break;

                case 4:
                    _indirectCRL = DerBoolean.GetInstance(o, false).IsTrue;
                    break;

                case 5:
                    _onlyContainsAttributeCerts = DerBoolean.GetInstance(o, false).IsTrue;
                    break;

                default:
                    throw new ArgumentException("unknown tag in IssuingDistributionPoint");
                }
            }
        }
예제 #2
0
        private DistributionPoint(
            Asn1Sequence seq)
        {
            for (int i = 0; i != seq.Count; i++)
            {
                Asn1TaggedObject t = Asn1TaggedObject.GetInstance(seq[i]);

                switch (t.TagNo)
                {
                case 0:
                    distributionPoint = DistributionPointName.GetInstance(t, true);
                    break;

                case 1:
                    reasons = new ReasonFlags(DerBitString.GetInstance(t, false));
                    break;

                case 2:
                    cRLIssuer = GeneralNames.GetInstance(t, false);
                    break;
                }
            }
        }