Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2013-09-28 02:28:24 +0400
committerDavid Hook <dgh@cryptoworkshop.com>2013-09-28 02:28:24 +0400
commit6adcf1a07fed0791dd5e46d5caa37af00d42fe14 (patch)
tree1ce881e9b737464ee72fd934d42f10a14f345503 /core/src/main/java/org/bouncycastle/math
parentbac4059714165ebb774c5c79765cbe3ed749e033 (diff)
removed deprecated methods from PKIX, work on implicitly CA.
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/ECPoint.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java b/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
index 1eb2ed80..3e0d37d3 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
@@ -230,8 +230,16 @@ public abstract class ECPoint
}
// TODO Consider just requiring already normalized, to avoid silent performance degradation
-
- ECPoint p = normalize();
+ // watch for degenerate point due to implicitlyCa
+ ECPoint p;
+ if (getCurve() != null)
+ {
+ p = normalize();
+ }
+ else
+ {
+ p = this;
+ }
return p.getXCoord().hashCode() ^ p.getYCoord().hashCode();
}