Forum Discussion

bbarranco's avatar
bbarranco
New Contributor
16 years ago

Problems using certificates from the Keystore

Im receiving a NullPointer Exception trying to set up a certificate from the project
Security Configurations > Keystores /Certificates options. First of all, I would like to know if is necessary to register all the certificates in Preferences > SSL Settings. I tried to do that Before with no results..
After that, I tried to set up a certificate from the Proyect Keystores / Certificates tag, using a
.p12 File but I got a NullPointerException so I cannot find out where would be the problem.

I ve tried it as well taking a certificate from the windows default repository (C:\Documents and Settings\windows user\Application Data\Microsoft\SystemCertificates\My\Certificates\) but when I use this kind I got a KeystoreException: Failed to extract any certificate or private keys - maybe bad password?  But Ive made sure it is the correct password.

1 Reply

  • bbarranco's avatar
    bbarranco
    New Contributor
    Finally I managed to see the certificate as "OK" exporting it with java keytool into a new .Keystore. But I'm getting the same error the error:
    Fri Nov 13 10:44:17 CET 2009:ERROR:javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
      javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
      at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
      at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
      at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
      at java.io.BufferedOutputStream.flush(Unknown Source)
      at java.io.FilterOutputStream.flush(Unknown Source)
      at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
      at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
      at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.writeRequest(ExtendedPostMethod.java:88)
      at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:170)
      at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:122)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

    But is the same certificate I'm using to connect using the web navigator..