skip test error for JDK versions ECKeyFactory that may not support all wolfCrypt curves
parent
58a89ab02f
commit
f98ae38819
|
@ -222,7 +222,7 @@ public class WolfCryptKeyPairGenerator extends KeyPairGeneratorSpi {
|
||||||
pair = new KeyPair(eccPub, eccPriv);
|
pair = new KeyPair(eccPub, eccPriv);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug.DEBUG)
|
if (debug.DEBUG)
|
||||||
|
|
|
@ -217,7 +217,15 @@ public class WolfCryptKeyPairGeneratorTest {
|
||||||
new ECGenParameterSpec(enabledCurves.get(i));
|
new ECGenParameterSpec(enabledCurves.get(i));
|
||||||
kpg.initialize(ecSpec);
|
kpg.initialize(ecSpec);
|
||||||
|
|
||||||
KeyPair kp = kpg.generateKeyPair();
|
try {
|
||||||
|
KeyPair kp = kpg.generateKeyPair();
|
||||||
|
} catch (Exception e) {
|
||||||
|
/* Some JDK versions' ECKeyFactory may not support all
|
||||||
|
* wolfCrypt's ECC curves */
|
||||||
|
if (!e.toString().contains("Unknown named curve")) {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue