summary refs log tree commit diff
path: root/crypto/src/openssl/PEMReader.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-02-03 15:19:53 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-02-03 15:19:53 +0700
commitb3a8c7160ce31e8b4ef03dc862f1dc7cfa0dd480 (patch)
tree241a1811db06dc3ceed1e61281f5e6ecb6388058 /crypto/src/openssl/PEMReader.cs
parentRemove Obsolete methods (diff)
downloadBouncyCastle.NET-ed25519-b3a8c7160ce31e8b4ef03dc862f1dc7cfa0dd480.tar.xz
Improve curve registry laziness
Diffstat (limited to 'crypto/src/openssl/PEMReader.cs')
-rw-r--r--crypto/src/openssl/PEMReader.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/crypto/src/openssl/PEMReader.cs b/crypto/src/openssl/PEMReader.cs
index 9a5f99b1a..65d3f5ad6 100644
--- a/crypto/src/openssl/PEMReader.cs
+++ b/crypto/src/openssl/PEMReader.cs
@@ -379,22 +379,12 @@ namespace Org.BouncyCastle.OpenSsl
 //			return GetCurveParameters(oid.Id);
 //		}
 
-        //private static ECDomainParameters GetCurveParameters(
-        private static X9ECParameters GetCurveParameters(
-            string name)
+        private static X9ECParameters GetCurveParameters(string name)
         {
-            // TODO ECGost3410NamedCurves support (returns ECDomainParameters though)
-
-            X9ECParameters ecP = CustomNamedCurves.GetByName(name);
-            if (ecP == null)
-            {
-                ecP = ECNamedCurveTable.GetByName(name);
-            }
-
+            X9ECParameters ecP = ECKeyPairGenerator.FindECCurveByName(name);
             if (ecP == null)
                 throw new Exception("unknown curve name: " + name);
 
-            //return new ECDomainParameters(ecP.Curve, ecP.G, ecP.N, ecP.H, ecP.GetSeed());
             return ecP;
         }
     }