Skip to content

Commit b9bc2df

Browse files
committed
added trim() - relates to github #1869
1 parent 4fe4ff4 commit b9bc2df

File tree

1 file changed

+8
-1
lines changed
  • prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util

1 file changed

+8
-1
lines changed

prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/ECUtil.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,14 @@ public static int getOrderBitLength(ProviderConfiguration configuration, BigInte
314314
public static ASN1ObjectIdentifier getNamedCurveOid(
315315
String curveName)
316316
{
317-
if (null == curveName || curveName.length() < 1)
317+
if (null == curveName)
318+
{
319+
return null;
320+
}
321+
322+
curveName = curveName.trim();
323+
324+
if (curveName.length() == 0)
318325
{
319326
return null;
320327
}

0 commit comments

Comments
 (0)