diff options
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/KeyAgreementSpi.java | 22 |
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; } |