From 06ba713c9b19102310675a6c58e07c68d8efb3c7 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 12 Oct 2015 15:49:54 +0700 Subject: Port of latest PGP tests and supporting code changes --- crypto/src/asn1/x9/ECNamedCurveTable.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'crypto/src/asn1/x9') diff --git a/crypto/src/asn1/x9/ECNamedCurveTable.cs b/crypto/src/asn1/x9/ECNamedCurveTable.cs index d8315c16f..92d4393a8 100644 --- a/crypto/src/asn1/x9/ECNamedCurveTable.cs +++ b/crypto/src/asn1/x9/ECNamedCurveTable.cs @@ -49,6 +49,28 @@ namespace Org.BouncyCastle.Asn1.X9 return ecP; } + public static string GetName(DerObjectIdentifier oid) + { + string name = X962NamedCurves.GetName(oid); + if (name == null) + { + name = SecNamedCurves.GetName(oid); + } + if (name == null) + { + name = NistNamedCurves.GetName(oid); + } + if (name == null) + { + name = TeleTrusTNamedCurves.GetName(oid); + } + if (name == null) + { + name = AnssiNamedCurves.GetName(oid); + } + return name; + } + /** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. -- cgit 1.4.1