From da2f36d4d313dc4cc736d8789700d78e052d1fc8 Mon Sep 17 00:00:00 2001 From: J08nY Date: Fri, 1 Dec 2017 12:41:08 +0100 Subject: Remove ECParametersSPec check in NativeKeyAgreementSpi. - This check makes sense in a real KeyAgreement, however for purposes of testing this would stop the invalid curve test from working. --- .../crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java index 913f73e..a58c0c8 100644 --- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java +++ b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java @@ -54,13 +54,6 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi { throw new InvalidKeyException ("Key must be an instance of ECPublicKey"); } - ECParameterSpec publicParams = ((ECPublicKey) key).getParams(); - if (!(params.getCurve().equals(publicParams.getCurve()) && - params.getGenerator().equals(publicParams.getGenerator()) && - params.getOrder().equals(publicParams.getOrder()) && - params.getCofactor() == publicParams.getCofactor())) { - throw new IllegalStateException("Mismatched parameters."); - } publicKey = (ECPublicKey) key; return null; } -- cgit v1.2.3-70-g09d2