summary refs log tree commit diff
path: root/crypto/src/openssl/PEMReader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/openssl/PEMReader.cs')
-rw-r--r--crypto/src/openssl/PEMReader.cs30
1 files changed, 12 insertions, 18 deletions
diff --git a/crypto/src/openssl/PEMReader.cs b/crypto/src/openssl/PEMReader.cs
index d2354dbe3..a2c4fd1d6 100644
--- a/crypto/src/openssl/PEMReader.cs
+++ b/crypto/src/openssl/PEMReader.cs
@@ -367,23 +367,17 @@ namespace Org.BouncyCastle.OpenSsl
             }
         }
 
-        // TODO Add an equivalent class for ECNamedCurveParameterSpec?
-        //private ECNamedCurveParameterSpec ReadECParameters(
-//		private X9ECParameters ReadECParameters(PemObject pemObject)
-//		{
-//			DerObjectIdentifier oid = (DerObjectIdentifier)Asn1Object.FromByteArray(pemObject.Content);
-//
-//			//return ECNamedCurveTable.getParameterSpec(oid.Id);
-//			return GetCurveParameters(oid.Id);
-//		}
-
-        private static X9ECParameters GetCurveParameters(string name)
-        {
-            X9ECParameters ecP = ECKeyPairGenerator.FindECCurveByName(name);
-            if (ecP == null)
-                throw new Exception("unknown curve name: " + name);
-
-            return ecP;
-        }
+        //private X9ECParameters ReadECParameters(PemObject pemObject)
+        //{
+        //    DerObjectIdentifier oid = (DerObjectIdentifier)Asn1Object.FromByteArray(pemObject.Content);
+
+        //    //return ECNamedCurveTable.getParameterSpec(oid.Id);
+        //    return GetCurveParameters(oid.Id);
+        //}
+
+        //private static X9ECParameters GetCurveParameters(string name)
+        //{
+        //    return ECKeyPairGenerator.FindECCurveByName(name) ?? throw new Exception("unknown curve name: " + name);
+        //}
     }
 }