diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-05 12:21:44 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-05 12:21:44 +0400 |
commit | cc05f027855d6165470d2dc697e6096e0779b644 (patch) | |
tree | ec2ac458ae11b007001b487cefbccd603fede1ce /pg | |
parent | f3fac8898e6557b5d3fd403c833a1db791c044d1 (diff) |
More custom curve temporary fixes
Diffstat (limited to 'pg')
-rw-r--r-- | pg/src/main/java/org/bouncycastle/bcpg/ECPublicBCPGKey.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pg/src/main/java/org/bouncycastle/bcpg/ECPublicBCPGKey.java b/pg/src/main/java/org/bouncycastle/bcpg/ECPublicBCPGKey.java index 9464af7c..fd79a928 100644 --- a/pg/src/main/java/org/bouncycastle/bcpg/ECPublicBCPGKey.java +++ b/pg/src/main/java/org/bouncycastle/bcpg/ECPublicBCPGKey.java @@ -10,6 +10,7 @@ import org.bouncycastle.asn1.x9.ECNamedCurveTable; import org.bouncycastle.asn1.x9.X9ECParameters; import org.bouncycastle.math.ec.ECCurve; import org.bouncycastle.math.ec.ECPoint; +import org.bouncycastle.math.ec.custom.sec.SecP256K1Curve; import org.bouncycastle.math.ec.custom.sec.SecP256R1Curve; import org.bouncycastle.util.BigIntegers; @@ -139,7 +140,8 @@ public abstract class ECPublicBCPGKey throw new IOException(oid.getId() + " does not match any known curve."); } // TODO: fix when custom curves have common interface - if (!((curve.getCurve() instanceof ECCurve.Fp) || (curve.getCurve() instanceof SecP256R1Curve))) + if (!((curve.getCurve() instanceof ECCurve.Fp) || (curve.getCurve() instanceof SecP256K1Curve)) + || (curve.getCurve() instanceof SecP256R1Curve)) { throw new IOException("Only FPCurves are supported."); } |