From: Tomas G. <to...@pr...> - 2009-11-02 10:15:36
|
You have configured the wrong keystore or password in ejbcawsracli.properties. the error is clear .-) Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect Cheers, Tomas khsheh wrote: > I am trying to create the IS cert and key. The CVCA documentation say that I > need to create an end entity for the IS and then use it to create the IS > cert / key. But I get the following errors when doing so. Is it related to > my ejbca Web Services being not properly setup or is it related to some > authentication issue like that in ejbcawsracli.properties? I cannot > understand the documentaton of how to setup the ejbcawsracli.properties. > Would you please help how to solve the probelms? My purpose is just to get > the IS cert and key. Thank you. > > 1) Creating an end entity > > C:\EJBCA_~1\dist\EJBCAW~1>ejbcawsracli edituser isrsa1 foo123 false > "CN=ISRSA1,C=CN" NULL NULL DV-RSA-1 1 USERGENERATED NEW IS IS > Trying to add user: > Username: isrsa1 > Subject DN: CN=ISRSA1,C=CN > Subject Altname: null > Email: null > CA Name: DV-RSA-1 > Type: 1 > Token: USERGENERATED > Status: 10 > End entity profile: IS > Certificate profile: IS > Hard Token Issuer Alias: NONE > Start time: NONE > End time: NONE > javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > org.ejbca.ui.cli.ErrorAdminCommandException: > javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > org.ejbca.core.protocol.ws.client.EditUserCommand.execute(EditUserCommand.java:166) > at > org.ejbca.core.protocol.ws.client.ejbcawsracli.main(ejbcawsracli.java:34) > Caused by: javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:162) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:188) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:66) > at com.sun.xml.ws.wsdl.WSDLContext.<init>(WSDLContext.java:57) > at > com.sun.xml.ws.client.ServiceContextBuilder.build(ServiceContextBuilder.java:60) > at > com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:103) > at > com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:50) > at javax.xml.ws.Service.<init>(Service.java:57) > at > org.ejbca.core.protocol.ws.client.gen.EjbcaWSService.<init>(EjbcaWSService.java:36) > at > org.ejbca.core.protocol.ws.client.EJBCAWSRABaseCommand.getEjbcaRAWS(EJBCAWSRABaseCommand.java:205) > at > org.ejbca.core.protocol.ws.client.EJBCAWSRABaseCommand.getEjbcaRAWS(EJBCAWSRABaseCommand.java:187) > at > org.ejbca.core.protocol.ws.client.EditUserCommand.execute(EditUserCommand.java:154) > ... 1 more > Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: > Error constructing implementation (algorithm: Default, provider: SunJSSE, > class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:179) > at > javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:186) > at > sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:362) > at sun.net.NetworkClient.doConnect(NetworkClient.java:145) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) > at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) > at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) > at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793) > at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041) > at > sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) > at java.net.URL.openStream(URL.java:1009) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:159) > ... 12 more > Caused by: java.security.NoSuchAlgorithmException: Error constructing > implementation (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at java.security.Provider$Service.newInstance(Provider.java:1245) > at sun.security.jca.GetInstance.getInstance(GetInstance.java:220) > at sun.security.jca.GetInstance.getInstance(GetInstance.java:147) > at javax.net.ssl.SSLContext.getInstance(SSLContext.java:125) > at javax.net.ssl.SSLContext.getDefault(SSLContext.java:68) > at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:102) > at > javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:325) > at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:283) > at > sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(HttpsURLConnectionImpl.java:65) > at sun.net.www.protocol.https.Handler.openConnection(Handler.java:42) > at sun.net.www.protocol.https.Handler.openConnection(Handler.java:37) > at java.net.URL.openConnection(URL.java:945) > ... 14 more > Caused by: java.io.IOException: Keystore was tampered with, or password was > incorrect > at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771) > at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38) > at java.security.KeyStore.load(KeyStore.java:1185) > at > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.getDefaultKeyManager(DefaultSSLContextImpl.java:150) > at > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.<init>(DefaultSSLContextImpl.java:40) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at java.security.Provider$Service.newInstance(Provider.java:1221) > ... 25 more > Caused by: java.security.UnrecoverableKeyException: Password verification > failed > at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769) > ... 36 more > > 2) Due to the above problem, I have created the end entity using the admin > web page of Add Entity. But I have the problem of creating the IS cert and > key as follows: > > C:\EJBCA_~1\dist\EJBCAW~1>cvcwscli cvcrequest isrsa foo123 "C=CN,CN=HKIS" > 00005 SHA1WithRSA 1024 true HKIS > > Enrolling user: > Username: isrsa > Subject name: C=CN,CN=HKIS > Sequence: 00005 > Signature algorithm: SHA1WithRSA > Key spec: 1024 > Generating a new request with base filename: HKIS > Wrote binary request to: HKIS.cvreq > Wrote private key in PKCS#8 format to to: HKIS.pkcs8 > Submitting CVC request for user 'isrsa'. > > javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > org.ejbca.ui.cli.ErrorAdminCommandException: > javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > org.ejbca.core.protocol.ws.client.CvcRequestCommand.execute(CvcRequestCommand.java:211) > at org.ejbca.core.protocol.ws.client.cvcwscli.main(cvcwscli.java:30) > Caused by: javax.xml.ws.WebServiceException: java.net.SocketException: > java.security.NoSuchAlgorithmException: Error constructing implementation > (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:162) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:188) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:66) > at com.sun.xml.ws.wsdl.WSDLContext.<init>(WSDLContext.java:57) > at > com.sun.xml.ws.client.ServiceContextBuilder.build(ServiceContextBuilder.java:60) > at > com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:103) > at > com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:50) > at javax.xml.ws.Service.<init>(Service.java:57) > at > org.ejbca.core.protocol.ws.client.gen.EjbcaWSService.<init>(EjbcaWSService.java:36) > at > org.ejbca.core.protocol.ws.client.EJBCAWSRABaseCommand.getEjbcaRAWS(EJBCAWSRABaseCommand.java:205) > at > org.ejbca.core.protocol.ws.client.EJBCAWSRABaseCommand.getEjbcaRAWS(EJBCAWSRABaseCommand.java:187) > at > org.ejbca.core.protocol.ws.client.CvcRequestCommand.execute(CvcRequestCommand.java:188) > ... 1 more > Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: > Error constructing implementation (algorithm: Default, provider: SunJSSE, > class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at > javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:179) > at > javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:186) > at > sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:362) > at sun.net.NetworkClient.doConnect(NetworkClient.java:145) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) > at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272) > at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329) > at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172) > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793) > at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041) > at > sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) > at java.net.URL.openStream(URL.java:1009) > at > com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:159) > ... 12 more > Caused by: java.security.NoSuchAlgorithmException: Error constructing > implementation (algorithm: Default, provider: SunJSSE, class: > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl) > at java.security.Provider$Service.newInstance(Provider.java:1245) > at sun.security.jca.GetInstance.getInstance(GetInstance.java:220) > at sun.security.jca.GetInstance.getInstance(GetInstance.java:147) > at javax.net.ssl.SSLContext.getInstance(SSLContext.java:125) > at javax.net.ssl.SSLContext.getDefault(SSLContext.java:68) > at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:102) > at > javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:325) > at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:283) > at > sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(HttpsURLConnectionImpl.java:65) > at sun.net.www.protocol.https.Handler.openConnection(Handler.java:42) > at sun.net.www.protocol.https.Handler.openConnection(Handler.java:37) > at java.net.URL.openConnection(URL.java:945) > ... 14 more > Caused by: java.io.IOException: Keystore was tampered with, or password was > incorrect > at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771) > at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38) > at java.security.KeyStore.load(KeyStore.java:1185) > at > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.getDefaultKeyManager(DefaultSSLContextImpl.java:150) > at > com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.<init>(DefaultSSLContextImpl.java:40) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at java.security.Provider$Service.newInstance(Provider.java:1221) > ... 25 more > Caused by: java.security.UnrecoverableKeyException: Password verification > failed > at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769) > ... 36 more > > Thanks a lot! > > > |