diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-02-03 15:19:53 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-02-03 15:19:53 +0700 |
commit | b3a8c7160ce31e8b4ef03dc862f1dc7cfa0dd480 (patch) | |
tree | 241a1811db06dc3ceed1e61281f5e6ecb6388058 /crypto/src/openssl | |
parent | Remove Obsolete methods (diff) | |
download | BouncyCastle.NET-ed25519-b3a8c7160ce31e8b4ef03dc862f1dc7cfa0dd480.tar.xz |
Improve curve registry laziness
Diffstat (limited to 'crypto/src/openssl')
-rw-r--r-- | crypto/src/openssl/PEMReader.cs | 14 |
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; } } |