RFC 3126: 4.3.2 Revocation Values Attribute Definition OtherRevVals ::= SEQUENCE { otherRevValType OtherRevValType, otherRevVals ANY DEFINED BY otherRevValType } OtherRevValType ::= OBJECT IDENTIFIER
Inheritance: Asn1Encodable
Example #1
0
        public RevocationValues(
            IEnumerable crlVals,
            IEnumerable ocspVals,
            OtherRevVals otherRevVals)
        {
            if (otherRevVals == null)
            {
                throw new ArgumentNullException("otherRevVals");
            }

            if (crlVals != null)
            {
                if (!CollectionUtilities.CheckElementsAreOfType <CertificateList>(crlVals))
                {
                    throw new ArgumentException("Must contain only 'CertificateList' objects", "crlVals");
                }

                this.crlVals = new DerSequence(
                    Asn1EncodableVector.FromEnumerable(crlVals));
            }

            if (ocspVals != null)
            {
                if (!CollectionUtilities.CheckElementsAreOfType <BasicOcspResponse>(ocspVals))
                {
                    throw new ArgumentException("Must contain only 'BasicOcspResponse' objects", "ocspVals");
                }

                this.ocspVals = new DerSequence(
                    Asn1EncodableVector.FromEnumerable(ocspVals));
            }

            this.otherRevVals = otherRevVals;
        }
Example #2
0
        public RevocationValues(
            IEnumerable			crlVals,
            IEnumerable			ocspVals,
            OtherRevVals		otherRevVals)
        {
            //if (otherRevVals == null)
            //	throw new ArgumentNullException("otherRevVals");

            if (crlVals != null)
            {
                if (!CollectionUtilities.CheckElementsAreOfType(crlVals, typeof(CertificateList)))
                    throw new ArgumentException("Must contain only 'CertificateList' objects", "crlVals");

                this.crlVals = new DerSequence(
                    Asn1EncodableVector.FromEnumerable(crlVals));
            }

            if (ocspVals != null)
            {
                if (!CollectionUtilities.CheckElementsAreOfType(ocspVals, typeof(BasicOcspResponse)))
                    throw new ArgumentException("Must contain only 'BasicOcspResponse' objects", "ocspVals");

                this.ocspVals = new DerSequence(
                    Asn1EncodableVector.FromEnumerable(ocspVals));
            }

            this.otherRevVals = otherRevVals;
        }
Example #3
0
 public RevocationValues(CertificateList[] crlVals, BasicOcspResponse[] ocspVals, OtherRevVals otherRevVals)
 {
     if (crlVals != null)
     {
         this.crlVals = new DerSequence(crlVals);
     }
     if (ocspVals != null)
     {
         this.ocspVals = new DerSequence(ocspVals);
     }
     this.otherRevVals = otherRevVals;
 }
Example #4
0
        private RevocationValues(
            Asn1Sequence seq)
        {
            if (seq == null)
            {
                throw new ArgumentNullException("seq");
            }
            if (seq.Count < 1 || seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
            }

            bool otherRevValsFound = false;

            foreach (Asn1TaggedObject taggedObj in seq)
            {
                Asn1Object asn1Obj = taggedObj.GetObject();
                switch (taggedObj.TagNo)
                {
                case 0:
                    Asn1Sequence crlValsSeq = (Asn1Sequence)asn1Obj;
                    foreach (Asn1Encodable ae in crlValsSeq)
                    {
                        CertificateList.GetInstance(ae.ToAsn1Object());
                    }
                    this.crlVals = crlValsSeq;
                    break;

                case 1:
                    Asn1Sequence ocspValsSeq = (Asn1Sequence)asn1Obj;
                    foreach (Asn1Encodable ae in ocspValsSeq)
                    {
                        BasicOcspResponse.GetInstance(ae.ToAsn1Object());
                    }
                    this.ocspVals = ocspValsSeq;
                    break;

                case 2:
                    this.otherRevVals = OtherRevVals.GetInstance(asn1Obj);
                    otherRevValsFound = true;
                    break;

                default:
                    throw new ArgumentException("Illegal tag in RevocationValues", "seq");
                }
            }

            if (!otherRevValsFound)
            {
                throw new ArgumentException("No otherRevVals found", "seq");
            }
        }
		public RevocationValues(
			CertificateList[]	crlVals,
			BasicOcspResponse[]	ocspVals,
			OtherRevVals		otherRevVals)
		{
			if (crlVals != null)
			{
				this.crlVals = new DerSequence(crlVals);
			}

			if (ocspVals != null)
			{
				this.ocspVals = new DerSequence(ocspVals);
			}

			this.otherRevVals = otherRevVals;
		}
Example #6
0
        private RevocationValues(Asn1Sequence seq)
        {
            if (seq == null)
            {
                throw new ArgumentNullException("seq");
            }
            if (seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
            }
            foreach (Asn1TaggedObject asn1TaggedObject in seq)
            {
                Asn1Object @object = asn1TaggedObject.GetObject();
                switch (asn1TaggedObject.TagNo)
                {
                case 0:
                {
                    Asn1Sequence asn1Sequence = (Asn1Sequence)@object;
                    foreach (Asn1Encodable asn1Encodable in asn1Sequence)
                    {
                        CertificateList.GetInstance(asn1Encodable.ToAsn1Object());
                    }
                    this.crlVals = asn1Sequence;
                    break;
                }

                case 1:
                {
                    Asn1Sequence asn1Sequence2 = (Asn1Sequence)@object;
                    foreach (Asn1Encodable asn1Encodable2 in asn1Sequence2)
                    {
                        BasicOcspResponse.GetInstance(asn1Encodable2.ToAsn1Object());
                    }
                    this.ocspVals = asn1Sequence2;
                    break;
                }

                case 2:
                    this.otherRevVals = OtherRevVals.GetInstance(@object);
                    break;

                default:
                    throw new ArgumentException("Illegal tag in RevocationValues", "seq");
                }
            }
        }
		private RevocationValues(
			Asn1Sequence seq)
		{
			if (seq == null)
				throw new ArgumentNullException("seq");
			if (seq.Count < 1 || seq.Count > 3)
				throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");

			bool otherRevValsFound = false;

			foreach (Asn1TaggedObject taggedObj in seq)
			{
				Asn1Object asn1Obj = taggedObj.GetObject();
				switch (taggedObj.TagNo)
				{
					case 0:
						Asn1Sequence crlValsSeq = (Asn1Sequence) asn1Obj;
						foreach (Asn1Encodable ae in crlValsSeq)
						{
							CertificateList.GetInstance(ae.ToAsn1Object());
						}
						this.crlVals = crlValsSeq;
						break;
					case 1:
						Asn1Sequence ocspValsSeq = (Asn1Sequence) asn1Obj;
						foreach (Asn1Encodable ae in ocspValsSeq)
						{
							BasicOcspResponse.GetInstance(ae.ToAsn1Object());
						}
						this.ocspVals = ocspValsSeq;
						break;
					case 2:
						this.otherRevVals = OtherRevVals.GetInstance(asn1Obj);
						otherRevValsFound = true;
						break;
					default:
						throw new ArgumentException("Illegal tag in RevocationValues", "seq");
				}
			}

			if (!otherRevValsFound)
				throw new ArgumentException("No otherRevVals found", "seq");
		}
Example #8
0
        public RevocationValues(
            CertificateList[]	crlVals,
            BasicOcspResponse[]	ocspVals,
            OtherRevVals		otherRevVals)
        {
            //if (otherRevVals == null)
            //	throw new ArgumentNullException("otherRevVals");

            if (crlVals != null)
            {
                this.crlVals = new DerSequence(crlVals);
            }

            if (ocspVals != null)
            {
                this.ocspVals = new DerSequence(ocspVals);
            }

            this.otherRevVals = otherRevVals;
        }
Example #9
0
        public RevocationValues(
            CertificateList[]       crlVals,
            BasicOcspResponse[]     ocspVals,
            OtherRevVals otherRevVals)
        {
            //if (otherRevVals == null)
            //	throw new ArgumentNullException("otherRevVals");

            if (crlVals != null)
            {
                this.crlVals = new DerSequence(crlVals);
            }

            if (ocspVals != null)
            {
                this.ocspVals = new DerSequence(ocspVals);
            }

            this.otherRevVals = otherRevVals;
        }
Example #10
0
 public RevocationValues(global::System.Collections.IEnumerable crlVals, global::System.Collections.IEnumerable ocspVals, OtherRevVals otherRevVals)
 {
     //IL_0025: Unknown result type (might be due to invalid IL or missing references)
     //IL_005b: Unknown result type (might be due to invalid IL or missing references)
     if (crlVals != null)
     {
         if (!CollectionUtilities.CheckElementsAreOfType(crlVals, typeof(CertificateList)))
         {
             throw new ArgumentException("Must contain only 'CertificateList' objects", "crlVals");
         }
         this.crlVals = new DerSequence(Asn1EncodableVector.FromEnumerable(crlVals));
     }
     if (ocspVals != null)
     {
         if (!CollectionUtilities.CheckElementsAreOfType(ocspVals, typeof(BasicOcspResponse)))
         {
             throw new ArgumentException("Must contain only 'BasicOcspResponse' objects", "ocspVals");
         }
         this.ocspVals = new DerSequence(Asn1EncodableVector.FromEnumerable(ocspVals));
     }
     this.otherRevVals = otherRevVals;
 }
Example #11
0
        private RevocationValues(Asn1Sequence seq)
        {
            //IL_000e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0037: Unknown result type (might be due to invalid IL or missing references)
            //IL_0141: Unknown result type (might be due to invalid IL or missing references)
            if (seq == null)
            {
                throw new ArgumentNullException("seq");
            }
            if (seq.Count > 3)
            {
                throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count), "seq");
            }
            global::System.Collections.IEnumerator enumerator = seq.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)enumerator.get_Current();
                    Asn1Object       @object          = asn1TaggedObject.GetObject();
                    switch (asn1TaggedObject.TagNo)
                    {
                    case 0:
                    {
                        Asn1Sequence asn1Sequence2 = (Asn1Sequence)@object;
                        {
                            global::System.Collections.IEnumerator enumerator2 = asn1Sequence2.GetEnumerator();
                            try
                            {
                                while (enumerator2.MoveNext())
                                {
                                    Asn1Encodable asn1Encodable2 = (Asn1Encodable)enumerator2.get_Current();
                                    CertificateList.GetInstance(asn1Encodable2.ToAsn1Object());
                                }
                            }
                            finally
                            {
                                global::System.IDisposable disposable2 = enumerator2 as global::System.IDisposable;
                                if (disposable2 != null)
                                {
                                    disposable2.Dispose();
                                }
                            }
                        }
                        crlVals = asn1Sequence2;
                        break;
                    }

                    case 1:
                    {
                        Asn1Sequence asn1Sequence = (Asn1Sequence)@object;
                        {
                            global::System.Collections.IEnumerator enumerator2 = asn1Sequence.GetEnumerator();
                            try
                            {
                                while (enumerator2.MoveNext())
                                {
                                    Asn1Encodable asn1Encodable = (Asn1Encodable)enumerator2.get_Current();
                                    BasicOcspResponse.GetInstance(asn1Encodable.ToAsn1Object());
                                }
                            }
                            finally
                            {
                                global::System.IDisposable disposable3 = enumerator2 as global::System.IDisposable;
                                if (disposable3 != null)
                                {
                                    disposable3.Dispose();
                                }
                            }
                        }
                        ocspVals = asn1Sequence;
                        break;
                    }

                    case 2:
                        otherRevVals = OtherRevVals.GetInstance(@object);
                        break;

                    default:
                        throw new ArgumentException("Illegal tag in RevocationValues", "seq");
                    }
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }