Inheritance: Asn1Encodable
コード例 #1
0
ファイル: V2Form.cs プロジェクト: smdx24/CPI-Source-Code
        private V2Form(Asn1Sequence seq)
        {
            //IL_0024: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
            if (seq.Count > 3)
            {
                throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count));
            }
            int num = 0;

            if (!(seq[0] is Asn1TaggedObject))
            {
                num++;
                issuerName = GeneralNames.GetInstance(seq[0]);
            }
            for (int i = num; i != seq.Count; i++)
            {
                Asn1TaggedObject instance = Asn1TaggedObject.GetInstance(seq[i]);
                if (instance.TagNo == 0)
                {
                    baseCertificateID = IssuerSerial.GetInstance(instance, explicitly: false);
                    continue;
                }
                if (instance.TagNo == 1)
                {
                    objectDigestInfo = ObjectDigestInfo.GetInstance(instance, isExplicit: false);
                    continue;
                }
                throw new ArgumentException(string.Concat((object)"Bad tag number: ", (object)instance.TagNo));
            }
        }
コード例 #2
0
		private V2Form(
            Asn1Sequence seq)
        {
			if (seq.Count > 3)
			{
				throw new ArgumentException("Bad sequence size: " + seq.Count);
			}

			int index = 0;

			if (!(seq[0] is Asn1TaggedObject))
            {
                index++;
                this.issuerName = GeneralNames.GetInstance(seq[0]);
            }

			for (int i = index; i != seq.Count; i++)
            {
				Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[i]);
				if (o.TagNo == 0)
                {
                    baseCertificateID = IssuerSerial.GetInstance(o, false);
                }
                else if (o.TagNo == 1)
                {
                    objectDigestInfo = ObjectDigestInfo.GetInstance(o, false);
                }
				else
				{
					throw new ArgumentException("Bad tag number: " + o.TagNo);
				}
			}
        }
コード例 #3
0
        private Holder(Asn1Sequence seq)
        {
            if (seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count);
            }
            for (int num = 0; num != seq.Count; num++)
            {
                Asn1TaggedObject instance = Asn1TaggedObject.GetInstance(seq[num]);
                switch (instance.TagNo)
                {
                case 0:
                    this.baseCertificateID = IssuerSerial.GetInstance(instance, false);
                    break;

                case 1:
                    this.entityName = GeneralNames.GetInstance(instance, false);
                    break;

                case 2:
                    this.objectDigestInfo = ObjectDigestInfo.GetInstance(instance, false);
                    break;

                default:
                    throw new ArgumentException("unknown tag in Holder");
                }
            }
            this.version = 1;
        }
コード例 #4
0
ファイル: V2Form.cs プロジェクト: straight-coding/EmbedTools
        private V2Form(
            Asn1Sequence seq)
        {
            if (seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count);
            }

            int index = 0;

            if (!(seq[0] is Asn1TaggedObject))
            {
                index++;
                this.issuerName = GeneralNames.GetInstance(seq[0]);
            }

            for (int i = index; i != seq.Count; i++)
            {
                Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[i]);
                if (o.TagNo == 0)
                {
                    baseCertificateID = IssuerSerial.GetInstance(o, false);
                }
                else if (o.TagNo == 1)
                {
                    objectDigestInfo = ObjectDigestInfo.GetInstance(o, false);
                }
                else
                {
                    throw new ArgumentException("Bad tag number: " + o.TagNo);
                }
            }
        }
コード例 #5
0
        private Holder(Asn1Sequence seq)
        {
            //IL_0024: Unknown result type (might be due to invalid IL or missing references)
            //IL_0088: Unknown result type (might be due to invalid IL or missing references)
            if (seq.Count > 3)
            {
                throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count));
            }
            for (int i = 0; i != seq.Count; i++)
            {
                Asn1TaggedObject instance = Asn1TaggedObject.GetInstance(seq[i]);
                switch (instance.TagNo)
                {
                case 0:
                    baseCertificateID = IssuerSerial.GetInstance(instance, explicitly: false);
                    break;

                case 1:
                    entityName = GeneralNames.GetInstance(instance, explicitly: false);
                    break;

                case 2:
                    objectDigestInfo = ObjectDigestInfo.GetInstance(instance, isExplicit: false);
                    break;

                default:
                    throw new ArgumentException("unknown tag in Holder");
                }
            }
            version = 1;
        }
コード例 #6
0
        private V2Form(Asn1Sequence seq)
        {
            if (seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count);
            }
            int num = 0;

            if (!(seq[0] is Asn1TaggedObject))
            {
                num++;
                this.issuerName = GeneralNames.GetInstance(seq[0]);
            }
            for (int num2 = num; num2 != seq.Count; num2++)
            {
                Asn1TaggedObject instance = Asn1TaggedObject.GetInstance(seq[num2]);
                if (instance.TagNo == 0)
                {
                    this.baseCertificateID = IssuerSerial.GetInstance(instance, false);
                }
                else
                {
                    if (instance.TagNo != 1)
                    {
                        throw new ArgumentException("Bad tag number: " + instance.TagNo);
                    }
                    this.objectDigestInfo = ObjectDigestInfo.GetInstance(instance, false);
                }
            }
        }
コード例 #7
0
        private Holder(
            Asn1Sequence seq)
        {
            if (seq.Count > 3)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count);
            }

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

                switch (tObj.TagNo)
                {
                case 0:
                    baseCertificateID = IssuerSerial.GetInstance(tObj, false);
                    break;

                case 1:
                    entityName = GeneralNames.GetInstance(tObj, false);
                    break;

                case 2:
                    objectDigestInfo = ObjectDigestInfo.GetInstance(tObj, false);
                    break;

                default:
                    throw new ArgumentException("unknown tag in Holder");
                }
            }
        }
コード例 #8
0
ファイル: V2Form.cs プロジェクト: straight-coding/EmbedTools
 public V2Form(
     GeneralNames issuerName,
     IssuerSerial baseCertificateID,
     ObjectDigestInfo objectDigestInfo)
 {
     this.issuerName        = issuerName;
     this.baseCertificateID = baseCertificateID;
     this.objectDigestInfo  = objectDigestInfo;
 }
コード例 #9
0
ファイル: V2Form.cs プロジェクト: MBrekhof/pleiobox-clients
 public V2Form(
     GeneralNames issuerName,
     IssuerSerial baseCertificateID,
     ObjectDigestInfo objectDigestInfo)
 {
     this.issuerName = issuerName;
     this.baseCertificateID = baseCertificateID;
     this.objectDigestInfo = objectDigestInfo;
 }
コード例 #10
0
ファイル: Holder.cs プロジェクト: KimikoMuffin/bc-csharp
		/**
		 * Constructor for a holder for an v2 attribute certificate. *
		 * 
		 * @param seq The ASN.1 sequence.
		 */
		private Holder(
            Asn1Sequence seq)
        {
			if (seq.Count > 3)
				throw new ArgumentException("Bad sequence size: " + seq.Count);

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

				switch (tObj.TagNo)
                {
                    case 0:
                        baseCertificateID = IssuerSerial.GetInstance(tObj, false);
                        break;
                    case 1:
                        entityName = GeneralNames.GetInstance(tObj, false);
                        break;
                    case 2:
                        objectDigestInfo = ObjectDigestInfo.GetInstance(tObj, false);
                        break;
                    default:
                        throw new ArgumentException("unknown tag in Holder");
                }
            }

			this.version = 1;
		}
コード例 #11
0
ファイル: Holder.cs プロジェクト: KimikoMuffin/bc-csharp
		/**
		 * Constructs a holder from an object digest info.
		 * 
		 * @param objectDigestInfo The object digest info object.
		 */
		public Holder(
			ObjectDigestInfo objectDigestInfo)
		{
			this.objectDigestInfo = objectDigestInfo;
			this.version = 1;
		}
コード例 #12
0
 public static ObjectDigestInfo GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(ObjectDigestInfo.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)));
 }
コード例 #13
0
 public Holder(ObjectDigestInfo objectDigestInfo)
 {
     this.objectDigestInfo = objectDigestInfo;
     this.version          = 1;
 }
コード例 #14
0
ファイル: V2Form.cs プロジェクト: straight-coding/EmbedTools
 public V2Form(GeneralNames issuerName, ObjectDigestInfo objectDigestInfo)
     : this(issuerName, null, objectDigestInfo)
 {
 }
コード例 #15
0
ファイル: V2Form.cs プロジェクト: htlp/itextsharp
 public V2Form(GeneralNames issuerName, ObjectDigestInfo objectDigestInfo)
     : this(issuerName, null, objectDigestInfo)
 {
 }