Repository navigation
Keytool not working with brainpool #2541
fco-code-org
started this conversation in
General
Replies: 1 comment
|
If I remove -providername BC in the command line, I got: So what's wrong ? Is it a bug ? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
Java 25 used.
Programmatically I am able to generate a brainpoolP256r1 keypair with this code
final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
final ECGenParameterSpec ecps = new ECGenParameterSpec("brainpoolP256r1");
keyGen.initialize(ecps);
KeyPair keyPair = keyGen.generateKeyPair();
I have in a directory bcprov-jdk18on-1.86.jar
In this directory I ran this:
keytool -genkeypair -alias myBrainpoolKeyPair -keyalg EC -groupname brainpoolP256r1 -validity 365 -keystore myTestBKS.bks -providerpath bcprov-jdk18on-1.86.jar -providerclass org.bouncycastle.jce.provider.BouncyCastleProvider -providername BC -storetype BKS -storepass testbks
I was asked to answer for the DN
And when I enter yes, I got keytool error: java.security.SignatureException: Curve not supported: org.bouncycastle.jce.spec.ECNamedCurveSpec@3d285d7e
I made several tries like adding -J-cp -Jbcprov-jdk18on-1.86.jar, provide the full path for the -providerpath, add BC entry in java.security file, remove -providername BC in the command line without any success :-(
I am puzzled.
Best Regards.
All reactions