OtherHash ::= CHOICE { sha1Hash OtherHashValue, -- This contains a SHA-1 hash otherHash OtherHashAlgAndValue } OtherHashValue ::= OCTET STRING
Inheritance: 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
			}
		}
		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
			}
		}
Example #3
0
 public CrlValidatedID(OtherHash crlHash, CrlIdentifier crlIdentifier)
 {
     if (crlHash == null)
     {
         throw new ArgumentNullException("crlHash");
     }
     this.crlHash       = crlHash;
     this.crlIdentifier = crlIdentifier;
 }
Example #4
0
 public OtherCertID(OtherHash otherCertHash, IssuerSerial issuerSerial)
 {
     if (otherCertHash == null)
     {
         throw new ArgumentNullException("otherCertHash");
     }
     this.otherCertHash = otherCertHash;
     this.issuerSerial  = issuerSerial;
 }
 public OcspResponsesID(OcspIdentifier ocspIdentifier, OtherHash ocspRepHash)
 {
     if (ocspIdentifier == null)
     {
         throw new ArgumentNullException("ocspIdentifier");
     }
     this.ocspIdentifier = ocspIdentifier;
     this.ocspRepHash    = ocspRepHash;
 }
Example #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;
 }
Example #7
0
		public OtherCertID(
			OtherHash		otherCertHash,
			IssuerSerial	issuerSerial)
		{
			if (otherCertHash == null)
				throw new ArgumentNullException("otherCertHash");

			this.otherCertHash = otherCertHash;
			this.issuerSerial = issuerSerial;
		}
Example #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;
 }
		public OcspResponsesID(
			OcspIdentifier	ocspIdentifier,
			OtherHash		ocspRepHash)
		{
			if (ocspIdentifier == null)
				throw new ArgumentNullException("ocspIdentifier");

			this.ocspIdentifier = ocspIdentifier;
			this.ocspRepHash = ocspRepHash;
		}
Example #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;
 }
		public CrlValidatedID(
			OtherHash		crlHash,
			CrlIdentifier	crlIdentifier)
		{
			if (crlHash == null)
				throw new ArgumentNullException("crlHash");

			this.crlHash = crlHash;
			this.crlIdentifier = crlIdentifier;
		}
		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());
			}
		}
Example #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());
			}
		}
Example #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());
			}
		}
Example #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());
     }
 }
Example #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());
     }
 }
 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());
     }
 }
Example #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());
     }
 }
Example #19
0
 public CrlValidatedID(
     OtherHash crlHash)
     : this(crlHash, null)
 {
 }
Example #20
0
 public OtherCertID(
     OtherHash otherCertHash)
     : this(otherCertHash, null)
 {
 }
		public CrlValidatedID(
			OtherHash crlHash)
			: this(crlHash, null)
		{
		}
Example #22
0
		public OtherCertID(
			OtherHash otherCertHash)
			: this(otherCertHash, null)
		{
		}