summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-24 12:57:09 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-24 12:57:09 +0700
commit521454273ff2d91222cf4b8ac6ab5f16c54b40df (patch)
treea996faffeebf62b4866a2e26a5c5fcf3407662c0 /crypto/test
parentadjusted HQC and BIKE keys for latest BC Java changes (diff)
downloadBouncyCastle.NET-ed25519-521454273ff2d91222cf4b8ac6ab5f16c54b40df.tar.xz
Use Asn1Set FromVector utility methods
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/asn1/test/SetTest.cs12
-rw-r--r--crypto/test/src/asn1/test/X509NameTest.cs4
2 files changed, 8 insertions, 8 deletions
diff --git a/crypto/test/src/asn1/test/SetTest.cs b/crypto/test/src/asn1/test/SetTest.cs
index 09421225e..dabe00ae1 100644
--- a/crypto/test/src/asn1/test/SetTest.cs
+++ b/crypto/test/src/asn1/test/SetTest.cs
@@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(new DerInteger(100));
 			v.Add(DerBoolean.True);
 
-			checkSortedSet(0, new DerSet(v));
+			checkSortedSet(0, DerSet.FromVector(v));
 
 			v = new Asn1EncodableVector();
 			v.Add(new DerInteger(100));
@@ -49,7 +49,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(new DerOctetString(data));
 			v.Add(new DerBitString(data));
 
-			checkSortedSet(1, new DerSet(v));
+			checkSortedSet(1, DerSet.FromVector(v));
 
 			v = new Asn1EncodableVector();
 			v.Add(DerBoolean.True);
@@ -58,7 +58,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(new DerInteger(100));
 
 
-			checkSortedSet(2, new DerSet(v));
+			checkSortedSet(2, DerSet.FromVector(v));
 
 			v = new Asn1EncodableVector();
 			v.Add(new DerBitString(data));
@@ -66,7 +66,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(new DerInteger(100));
 			v.Add(DerBoolean.True);
 
-			checkSortedSet(3, new DerSet(v));
+			checkSortedSet(3, DerSet.FromVector(v));
 
 			v = new Asn1EncodableVector();
 			v.Add(new DerOctetString(data));
@@ -74,7 +74,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(new DerInteger(100));
 			v.Add(DerBoolean.True);
 
-			Asn1Set s = new BerSet(v);
+			Asn1Set s = BerSet.FromVector(v);
 
 			if (!(s[0] is DerOctetString))
 			{
@@ -101,7 +101,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 			v.Add(DerBoolean.True);
 			v.Add(DerBoolean.True);
 
-			s = new DerSet(v);
+			s = DerSet.FromVector(v);
 		}
 
 		[Test]
diff --git a/crypto/test/src/asn1/test/X509NameTest.cs b/crypto/test/src/asn1/test/X509NameTest.cs
index 098500a0b..9eab25952 100644
--- a/crypto/test/src/asn1/test/X509NameTest.cs
+++ b/crypto/test/src/asn1/test/X509NameTest.cs
@@ -389,7 +389,7 @@ namespace Org.BouncyCastle.Asn1.Tests
                 new DerObjectIdentifier("1.1"),
                 new DerObjectIdentifier("1.1"));
 
-            if (name1.Equals(new DerSequence(new DerSet(new DerSet(v)))))
+            if (name1.Equals(new DerSequence(new DerSet(DerSet.FromVector(v)))))
             {
                 Fail("inequality test with sequence and bad set");
             }
@@ -400,7 +400,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 //			}
             try
             {
-                X509Name.GetInstance(new DerSequence(new DerSet(new DerSet(v))));
+                X509Name.GetInstance(new DerSequence(new DerSet(DerSet.FromVector(v))));
                 Fail("GetInstance should reject bad sequence");
             }
             catch (ArgumentException)