summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Vartanian <flooey@google.com>2017-03-30 08:34:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-03-30 08:34:30 +0000
commit49edf3ace65807e571aa173e9a7aa3523f96a63b (patch)
tree15e408fbab64401b8e4da69b594e1b4d3275596d
parent6feb860f988cd848595782946fd16d6b536d3fb8 (diff)
parent07e660219caac9bf288ffb6b101606ba6efe8184 (diff)
downloadbouncycastle-49edf3ace65807e571aa173e9a7aa3523f96a63b.tar.gz
Merge "Remove an Android change that is causing a test to fail"
-rw-r--r--bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
index 5d8e6b18..6e1eda2d 100644
--- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
+++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java
@@ -133,20 +133,14 @@ public class KeyAgreementSpi
try
{
result = agreement.calculateAgreement(pubKey);
- // BEGIN android-changed
- // Was:
- // } catch (final Exception e) {
- // throw new InvalidKeyException("calculation failed: " + e.getMessage())
- // {
- // public Throwable getCause()
- // {
- // return e;
- // }
- // };
- // }
- // END android-changed
- } catch (IllegalStateException e) {
- throw new InvalidKeyException("Invalid public key");
+ } catch (final Exception e) {
+ throw new InvalidKeyException("calculation failed: " + e.getMessage())
+ {
+ public Throwable getCause()
+ {
+ return e;
+ }
+ };
}
return null;
}