aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java b/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
index ffcfc67..1447373 100644
--- a/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
+++ b/src/cz/crcs/ectester/standalone/test/base/KeyAgreementTestable.java
@@ -87,8 +87,7 @@ public class KeyAgreementTestable extends StandaloneTestable<KeyAgreementTestabl
ka.init(privateKey);
}
} catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
- ok = false;
- hasRun = true;
+ failOnException(e);
return;
}
@@ -96,17 +95,15 @@ public class KeyAgreementTestable extends StandaloneTestable<KeyAgreementTestabl
try {
ka.doPhase(publicKey, true);
} catch (IllegalStateException | InvalidKeyException e) {
- ok = false;
- hasRun = true;
+ failOnException(e);
return;
}
stage = KeyAgreementStage.GenerateSecret;
try {
secret = ka.generateSecret();
- } catch (IllegalStateException | UnsupportedOperationException isex) {
- ok = false;
- hasRun = true;
+ } catch (IllegalStateException | UnsupportedOperationException e) {
+ failOnException(e);
return;
}