Keyfactor / ejbca-easy-rest-client

Erce – The Easy Rest Client for EJBCA
GNU Lesser General Public License v2.1
10 stars 2 forks source link

genkey with EC does not work #4

Closed svenska-primekey closed 1 year ago

svenska-primekey commented 1 year ago

ejbca-easy-rest-client]$ java -jar target/erce-0.0.8-SNAPSHOT.jar enroll genkeys --authkeystore ~/keyfactorCommunitySuperAdmin.p12 --authkeystorepass ****** --endentityprofile "TLS Server Profile" --certificateprofile "TLS Server Profile" --ca MyPKISubCA-G1 --subjectaltname "dnsName=test-erces-01.test" --hostname ejbca-node1 --destination ./certs --subjectdn "C=SE,O=Keyfactor Community,CN=test-erces-01.test" --username test-erces-01.test -p --keyalg EC --keyspec P-256 --verbose

Errors with the following:

` SETTING: --authkeystore as /home/user/keyfactorCommunitySuperAdmin.p12 SETTING: --authkeystorepass as ** SETTING: --endentityprofile as TLS Server Profile SETTING: --certificateprofile as TLS Server Profile SETTING: --ca as MyPKISubCA-G1 SETTING: --subjectaltname as dnsName=test-erces-01.test SETTING: --hostname as ejbca-node1 SETTING: --destination as ./certs SETTING: --subjectdn as C=SE,O=Keyfactor Community,CN=test-erces-01.test SETTING: --username as test-erces-01.test Enter password for parameter (-p):

SETTING: --keyalg as EC SETTING: --keyspec as P-256 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at com.keyfactor.util.crypto.algorithm.AlgorithmTools.isPQC(AlgorithmTools.java:1414) at com.keyfactor.util.CryptoProviderTools.getProviderNameFromAlg(CryptoProviderTools.java:103) at com.keyfactor.util.keys.KeyTools.genKeys(KeyTools.java:197) at com.keyfactor.util.keys.KeyTools.genKeys(KeyTools.java:316) at com.keyfactor.ejbca.client.enroll.EnrollGenKeysCommand.execute(EnrollGenKeysCommand.java:137) at com.keyfactor.ejbca.client.ErceCommandBase.execute(ErceCommandBase.java:107) at org.ejbca.ui.cli.infrastructure.library.CommandLibrary$Branch.execute(CommandLibrary.java:289) at org.ejbca.ui.cli.infrastructure.library.CommandLibrary$Branch.execute(CommandLibrary.java:300) at org.ejbca.ui.cli.infrastructure.library.CommandLibrary.findAndExecuteCommandFromParameters(CommandLibrary.java:68) at com.keyfactor.ejbca.client.ErceClient.main(ErceClient.java:32) Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 10 more `

svenska-primekey commented 1 year ago

Same error occurs when using the withkeys option