summary refs log tree commit diff
path: root/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/test/src/math/ec/test/ECPointPerformanceTest.cs')
-rw-r--r--crypto/test/src/math/ec/test/ECPointPerformanceTest.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
index 04bc43716..51febaf32 100644
--- a/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
+++ b/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs
@@ -175,17 +175,27 @@ namespace Org.BouncyCastle.Math.EC.Tests
         {
             ArrayList nameList = new ArrayList();
             CollectionUtilities.AddRange(nameList, ECNamedCurveTable.Names);
+            CollectionUtilities.AddRange(nameList, CustomNamedCurves.Names);
+
             string[] names = (string[])nameList.ToArray(typeof(string));
             Array.Sort(names);
             ISet oids = new HashSet();
             foreach (string name in names)
             {
                 DerObjectIdentifier oid = ECNamedCurveTable.GetOid(name);
-                if (!oids.Contains(oid))
+                if (oid == null)
+                {
+                    oid = CustomNamedCurves.GetOid(name);
+                }
+                if (oid != null)
                 {
+                    if (oids.Contains(oid))
+                        continue;
+
                     oids.Add(oid);
-                    RandMult(name);
                 }
+
+                RandMult(name);
             }
         }