Наследование: Org.BouncyCastle.Asn1.Asn1Encodable
Пример #1
0
 public AttributeCertificate(
     AttributeCertificateInfo acinfo,
     AlgorithmIdentifier signatureAlgorithm,
     DerBitString signatureValue)
 {
     this.acinfo             = acinfo;
     this.signatureAlgorithm = signatureAlgorithm;
     this.signatureValue     = signatureValue;
 }
		public AttributeCertificate(
            AttributeCertificateInfo	acinfo,
            AlgorithmIdentifier			signatureAlgorithm,
            DerBitString				signatureValue)
        {
            this.acinfo = acinfo;
            this.signatureAlgorithm = signatureAlgorithm;
            this.signatureValue = signatureValue;
        }
		private AttributeCertificate(
            Asn1Sequence seq)
        {
			if (seq.Count != 3)
				throw new ArgumentException("Bad sequence size: " + seq.Count);

			this.acinfo = AttributeCertificateInfo.GetInstance(seq[0]);
            this.signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
            this.signatureValue = DerBitString.GetInstance(seq[2]);
        }
Пример #4
0
 private AttributeCertificate(Asn1Sequence seq)
 {
     if (seq.Count != 3)
     {
         throw new ArgumentException("Bad sequence size: " + seq.Count);
     }
     this.acinfo             = AttributeCertificateInfo.GetInstance(seq[0]);
     this.signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
     this.signatureValue     = DerBitString.GetInstance(seq[2]);
 }
Пример #5
0
 private AttributeCertificate(Asn1Sequence seq)
 {
     //IL_0024: 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));
     }
     acinfo             = AttributeCertificateInfo.GetInstance(seq[0]);
     signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
     signatureValue     = DerBitString.GetInstance(seq[2]);
 }
        public AttributeCertificateInfo GenerateAttributeCertificateInfo()
        {
            //IL_003d: Unknown result type (might be due to invalid IL or missing references)
            if (serialNumber == null || signature == null || issuer == null || startDate == null || endDate == null || holder == null || attributes == null)
            {
                throw new InvalidOperationException("not all mandatory fields set in V2 AttributeCertificateInfo generator");
            }
            Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(version, holder, issuer, signature, serialNumber);

            asn1EncodableVector.Add(new AttCertValidityPeriod(startDate, endDate));
            asn1EncodableVector.Add(new DerSequence(attributes));
            if (issuerUniqueID != null)
            {
                asn1EncodableVector.Add(issuerUniqueID);
            }
            if (extensions != null)
            {
                asn1EncodableVector.Add(extensions);
            }
            return(AttributeCertificateInfo.GetInstance(new DerSequence(asn1EncodableVector)));
        }
Пример #7
0
        public AttributeCertificateInfo GenerateAttributeCertificateInfo()
        {
            if (this.serialNumber == null || this.signature == null || this.issuer == null || this.startDate == null || this.endDate == null || this.holder == null || this.attributes == null)
            {
                throw new InvalidOperationException("not all mandatory fields set in V2 AttributeCertificateInfo generator");
            }
            Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(new Asn1Encodable[]
            {
                this.version,
                this.holder,
                this.issuer,
                this.signature,
                this.serialNumber
            });

            asn1EncodableVector.Add(new Asn1Encodable[]
            {
                new AttCertValidityPeriod(this.startDate, this.endDate)
            });
            asn1EncodableVector.Add(new Asn1Encodable[]
            {
                new DerSequence(this.attributes)
            });
            if (this.issuerUniqueID != null)
            {
                asn1EncodableVector.Add(new Asn1Encodable[]
                {
                    this.issuerUniqueID
                });
            }
            if (this.extensions != null)
            {
                asn1EncodableVector.Add(new Asn1Encodable[]
                {
                    this.extensions
                });
            }
            return(AttributeCertificateInfo.GetInstance(new DerSequence(asn1EncodableVector)));
        }
Пример #8
0
 public static AttributeCertificateInfo GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(AttributeCertificateInfo.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)));
 }