summary refs log tree commit diff
path: root/crypto/src/tls
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/tls
parentRemove Obsolete methods (diff)
downloadBouncyCastle.NET-ed25519-b3a8c7160ce31e8b4ef03dc862f1dc7cfa0dd480.tar.xz
Improve curve registry laziness
Diffstat (limited to 'crypto/src/tls')
-rw-r--r--crypto/src/tls/crypto/impl/bc/BcTlsECDomain.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsECDomain.cs b/crypto/src/tls/crypto/impl/bc/BcTlsECDomain.cs
index f4c5cfc5d..61d11fb42 100644
--- a/crypto/src/tls/crypto/impl/bc/BcTlsECDomain.cs
+++ b/crypto/src/tls/crypto/impl/bc/BcTlsECDomain.cs
@@ -48,13 +48,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC
             // Parameters are lazily created the first time a particular curve is accessed
 
             string curveName = NamedGroup.GetCurveName(namedGroup);
-            X9ECParameters ecP = CustomNamedCurves.GetByName(curveName);
+            X9ECParameters ecP = ECKeyPairGenerator.FindECCurveByName(curveName);
             if (ecP == null)
-            {
-                ecP = ECNamedCurveTable.GetByName(curveName);
-                if (ecP == null)
-                    return null;
-            }
+                return null;
 
             // It's a bit inefficient to do this conversion every time
             return new ECDomainParameters(ecP.Curve, ecP.G, ecP.N, ecP.H, ecP.GetSeed());