OtherHash ::= CHOICE { sha1Hash OtherHashValue, -- This contains a SHA-1 hash otherHash OtherHashAlgAndValue } OtherHashValue ::= OCTET STRING
Наследование: Asn1Encodable, IAsn1Choice
		public override void PerformTest()
		{
			AlgorithmIdentifier algId = new AlgorithmIdentifier(new DerObjectIdentifier("1.2.2.3"));
			byte[] digest = new byte[20];
			OtherHash otherHash = new OtherHash(
				new OtherHashAlgAndValue(algId, digest));
			OtherCertID otherCertID = new OtherCertID(otherHash);

			OtherSigningCertificate otherCert = new OtherSigningCertificate(otherCertID);

			checkConstruction(otherCert, otherCertID);

			otherCert = OtherSigningCertificate.GetInstance(null);

			if (otherCert != null)
			{
				Fail("null GetInstance() failed.");
			}

			try
			{
				OtherCertID.GetInstance(new Object());

				Fail("GetInstance() failed to detect bad object.");
			}
			catch (ArgumentException)
			{
				// expected
			}
		}
Пример #2
0
		public override void PerformTest()
		{
			AlgorithmIdentifier algId = new AlgorithmIdentifier(new DerObjectIdentifier("1.2.2.3"));
			byte[] digest = new byte[20];
			OtherHash otherHash = new OtherHash(new OtherHashAlgAndValue(algId, digest));
			IssuerSerial issuerSerial = new IssuerSerial(new GeneralNames(new GeneralName(new X509Name("CN=test"))), new DerInteger(1));

			OtherCertID certID = new OtherCertID(otherHash);

			checkConstruction(certID, algId, digest, null);

			certID = new OtherCertID(otherHash, issuerSerial);

			checkConstruction(certID, algId, digest, issuerSerial);

			certID = OtherCertID.GetInstance(null);

			if (certID != null)
			{
				Fail("null GetInstance() failed.");
			}

			try
			{
				OtherCertID.GetInstance(new Object());

				Fail("GetInstance() failed to detect bad object.");
			}
			catch (ArgumentException)
			{
				// expected
			}
		}
Пример #3
0
 public CrlValidatedID(OtherHash crlHash, CrlIdentifier crlIdentifier)
 {
     if (crlHash == null)
     {
         throw new ArgumentNullException("crlHash");
     }
     this.crlHash       = crlHash;
     this.crlIdentifier = crlIdentifier;
 }
Пример #4
0
 public OtherCertID(OtherHash otherCertHash, IssuerSerial issuerSerial)
 {
     if (otherCertHash == null)
     {
         throw new ArgumentNullException("otherCertHash");
     }
     this.otherCertHash = otherCertHash;
     this.issuerSerial  = issuerSerial;
 }
Пример #5
0
 public OcspResponsesID(OcspIdentifier ocspIdentifier, OtherHash ocspRepHash)
 {
     if (ocspIdentifier == null)
     {
         throw new ArgumentNullException("ocspIdentifier");
     }
     this.ocspIdentifier = ocspIdentifier;
     this.ocspRepHash    = ocspRepHash;
 }
Пример #6
0
 public CrlValidatedID(OtherHash crlHash, CrlIdentifier crlIdentifier)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (crlHash == null)
     {
         throw new ArgumentNullException("crlHash");
     }
     this.crlHash       = crlHash;
     this.crlIdentifier = crlIdentifier;
 }
Пример #7
0
		public OtherCertID(
			OtherHash		otherCertHash,
			IssuerSerial	issuerSerial)
		{
			if (otherCertHash == null)
				throw new ArgumentNullException("otherCertHash");

			this.otherCertHash = otherCertHash;
			this.issuerSerial = issuerSerial;
		}
Пример #8
0
 public OtherCertID(OtherHash otherCertHash, IssuerSerial issuerSerial)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (otherCertHash == null)
     {
         throw new ArgumentNullException("otherCertHash");
     }
     this.otherCertHash = otherCertHash;
     this.issuerSerial  = issuerSerial;
 }
Пример #9
0
		public OcspResponsesID(
			OcspIdentifier	ocspIdentifier,
			OtherHash		ocspRepHash)
		{
			if (ocspIdentifier == null)
				throw new ArgumentNullException("ocspIdentifier");

			this.ocspIdentifier = ocspIdentifier;
			this.ocspRepHash = ocspRepHash;
		}
Пример #10
0
 public OcspResponsesID(OcspIdentifier ocspIdentifier, OtherHash ocspRepHash)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (ocspIdentifier == null)
     {
         throw new ArgumentNullException("ocspIdentifier");
     }
     this.ocspIdentifier = ocspIdentifier;
     this.ocspRepHash    = ocspRepHash;
 }
Пример #11
0
		public CrlValidatedID(
			OtherHash		crlHash,
			CrlIdentifier	crlIdentifier)
		{
			if (crlHash == null)
				throw new ArgumentNullException("crlHash");

			this.crlHash = crlHash;
			this.crlIdentifier = crlIdentifier;
		}
Пример #12
0
		private CrlValidatedID(
			Asn1Sequence seq)
		{
			if (seq == null)
				throw new ArgumentNullException("seq");
			if (seq.Count < 1 || seq.Count > 2)
				throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");

			this.crlHash = OtherHash.GetInstance(seq[0].ToAsn1Object());

			if (seq.Count > 1)
			{
				this.crlIdentifier = CrlIdentifier.GetInstance(seq[1].ToAsn1Object());
			}
		}
Пример #13
0
		private OcspResponsesID(
			Asn1Sequence seq)
		{
			if (seq == null)
				throw new ArgumentNullException("seq");
			if (seq.Count < 1 || seq.Count > 2)
				throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");

			this.ocspIdentifier = OcspIdentifier.GetInstance(seq[0].ToAsn1Object());

			if (seq.Count > 1)
			{
				this.ocspRepHash = OtherHash.GetInstance(seq[1].ToAsn1Object());
			}
		}
Пример #14
0
		private OtherCertID(
			Asn1Sequence seq)
		{
			if (seq == null)
				throw new ArgumentNullException("seq");
			if (seq.Count < 1 || seq.Count > 2)
				throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");

			this.otherCertHash = OtherHash.GetInstance(seq[0].ToAsn1Object());

			if (seq.Count > 1)
			{
				this.issuerSerial = IssuerSerial.GetInstance(seq[1].ToAsn1Object());
			}
		}
Пример #15
0
 private OtherCertID(Asn1Sequence seq)
 {
     if (seq == null)
     {
         throw new ArgumentNullException("seq");
     }
     if (seq.Count < 1 || seq.Count > 2)
     {
         throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
     }
     this.otherCertHash = OtherHash.GetInstance(seq[0].ToAsn1Object());
     if (seq.Count > 1)
     {
         this.issuerSerial = IssuerSerial.GetInstance(seq[1].ToAsn1Object());
     }
 }
Пример #16
0
 private CrlValidatedID(Asn1Sequence seq)
 {
     if (seq == null)
     {
         throw new ArgumentNullException("seq");
     }
     if (seq.Count < 1 || seq.Count > 2)
     {
         throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
     }
     this.crlHash = OtherHash.GetInstance(seq[0].ToAsn1Object());
     if (seq.Count > 1)
     {
         this.crlIdentifier = CrlIdentifier.GetInstance(seq[1].ToAsn1Object());
     }
 }
Пример #17
0
 private OcspResponsesID(Asn1Sequence seq)
 {
     if (seq == null)
     {
         throw new ArgumentNullException("seq");
     }
     if (seq.Count < 1 || seq.Count > 2)
     {
         throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
     }
     this.ocspIdentifier = OcspIdentifier.GetInstance(seq[0].ToAsn1Object());
     if (seq.Count > 1)
     {
         this.ocspRepHash = OtherHash.GetInstance(seq[1].ToAsn1Object());
     }
 }
Пример #18
0
 private CrlValidatedID(Asn1Sequence seq)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0040: Unknown result type (might be due to invalid IL or missing references)
     if (seq == null)
     {
         throw new ArgumentNullException("seq");
     }
     if (seq.Count < 1 || seq.Count > 2)
     {
         throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count), "seq");
     }
     crlHash = OtherHash.GetInstance(seq[0].ToAsn1Object());
     if (seq.Count > 1)
     {
         crlIdentifier = CrlIdentifier.GetInstance(seq[1].ToAsn1Object());
     }
 }
Пример #19
0
 public CrlValidatedID(
     OtherHash crlHash)
     : this(crlHash, null)
 {
 }
Пример #20
0
 public OtherCertID(
     OtherHash otherCertHash)
     : this(otherCertHash, null)
 {
 }
Пример #21
0
		public CrlValidatedID(
			OtherHash crlHash)
			: this(crlHash, null)
		{
		}
Пример #22
0
		public OtherCertID(
			OtherHash otherCertHash)
			: this(otherCertHash, null)
		{
		}