summary refs log tree commit diff
path: root/crypto/src/asn1/sec/SECNamedCurves.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/sec/SECNamedCurves.cs')
-rw-r--r--crypto/src/asn1/sec/SECNamedCurves.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/src/asn1/sec/SECNamedCurves.cs b/crypto/src/asn1/sec/SECNamedCurves.cs
index 60d456ef0..0bd60b0b8 100644
--- a/crypto/src/asn1/sec/SECNamedCurves.cs
+++ b/crypto/src/asn1/sec/SECNamedCurves.cs
@@ -1154,7 +1154,7 @@ namespace Org.BouncyCastle.Asn1.Sec
             DerObjectIdentifier		oid,
             X9ECParametersHolder	holder)
         {
-            objIds.Add(name, oid);
+            objIds.Add(Platform.ToLowerInvariant(name), oid);
             names.Add(oid, name);
             curves.Add(oid, holder);
         }
@@ -1200,9 +1200,7 @@ namespace Org.BouncyCastle.Asn1.Sec
         public static X9ECParameters GetByName(
             string name)
         {
-            DerObjectIdentifier oid = (DerObjectIdentifier)
-                objIds[Platform.ToLowerInvariant(name)];
-
+            DerObjectIdentifier oid = GetOid(name);
             return oid == null ? null : GetByOid(oid);
         }
 
@@ -1215,8 +1213,7 @@ namespace Org.BouncyCastle.Asn1.Sec
         public static X9ECParameters GetByOid(
             DerObjectIdentifier oid)
         {
-            X9ECParametersHolder holder = (X9ECParametersHolder) curves[oid];
-
+            X9ECParametersHolder holder = (X9ECParametersHolder)curves[oid];
             return holder == null ? null : holder.Parameters;
         }
 
@@ -1238,7 +1235,7 @@ namespace Org.BouncyCastle.Asn1.Sec
         public static string GetName(
             DerObjectIdentifier oid)
         {
-            return (string) names[oid];
+            return (string)names[oid];
         }
 
         /**
@@ -1247,7 +1244,7 @@ namespace Org.BouncyCastle.Asn1.Sec
          */
         public static IEnumerable Names
         {
-            get { return new EnumerableProxy(objIds.Keys); }
+            get { return new EnumerableProxy(names.Values); }
         }
     }
 }