This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received." Watch "FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received." New topic
Author

FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.

lvrao
Greenhorn

Joined: Apr 12, 2006
Posts: 2
Hi,

I have tried all methods listed on bea dev2dev to resolve this issue.

Trying to call a webservice over https, the application works fine when I try it as standalone, but throws this exception when calling from the a portal code [ ARSResouceBean ] running on WEBLOGIC 7.0.

Have imported the server generated certificate into cacerts keystore and have the following in the weblogic startup options

set JAVA_OPTIONS=-Dcommerce.properties="%WLP_HOME%\weblogiccommerce.properties" -Dweblogic.management.pkpassword=abc -Dweblogic.security.SSL.trustedCAKeyStore=C:\bea700\jdk131_03\jre\lib\security\cacerts -Djavax.net.ssl.trustStorePassword=changeit -Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=true -Djava.protocol.handler.pkgs=com.certicom.net.ssl -Dhttps.sharedsocket=true -Dweblogic.webservice.client.ssl.strictcertchecking=false


Any suggestions ?Thanks


####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <HANDSHAKEMESSAGE: Certificate>
####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <NEW ALERT: com.certicom.tls.record.alert.Alert@7d2442 Severity: 2 Type: 42>
java.lang.Exception: Stack trace
at weblogic.security.utils.SSLSetup.debug(SSLSetup.java:237)
at com.certicom.tls.record.alert.Alert.<init>(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
at com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at javax.net.ssl.impl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:244)
at org.apache.axis.transport.http.HTTPSender.getSecureSocket(HTTPSender.java:156)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:116)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1373)
at net.verio.powerportal.util.GMPSoapClient.invokeCall(GMPSoapClient.java:109)
at net.verio.powerportal.util.GMPSoapClient.execute(GMPSoapClient.java:73)
at net.verio.powerportal.ejb.ars.ARSResourceBean.getSevenSpaceFlag(ARSResourceBean.java:3420)
at net.verio.powerportal.ejb.ars.ARSResourceBean_vdkfgg_EOImpl.getSevenSpaceFlag(ARSResourceBean_vdkfgg_EOImpl.java:802)
at net.verio.ehip.processor.CustomerDashboardThreadProcessor.hasManagedServices(CustomerDashboardThreadProcessor.java:892)
at java.lang.reflect.Method.invoke(Native Method)
at net.verio.ehip.thread.GenericRunnable.run(GenericRunnable.java:108)
at java.lang.Thread.run(Thread.java:479)
####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <write ALERT offset = 0 length = 2>
####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <close(): 6925374>
####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <Exception during handshake, stack trace follows>
javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
at com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at javax.net.ssl.impl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:244)
at org.apache.axis.transport.http.HTTPSender.getSecureSocket(HTTPSender.java:156)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:116)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1373)
at net.verio.powerportal.util.GMPSoapClient.invokeCall(GMPSoapClient.java:109)
at net.verio.powerportal.util.GMPSoapClient.execute(GMPSoapClient.java:73)
at net.verio.powerportal.ejb.ars.ARSResourceBean.getSevenSpaceFlag(ARSResourceBean.java:3420)
at net.verio.powerportal.ejb.ars.ARSResourceBean_vdkfgg_EOImpl.getSevenSpaceFlag(ARSResourceBean_vdkfgg_EOImpl.java:802)
at net.verio.ehip.processor.CustomerDashboardThreadProcessor.hasManagedServices(CustomerDashboardThreadProcessor.java:892)
at java.lang.reflect.Method.invoke(Native Method)
at net.verio.ehip.thread.GenericRunnable.run(GenericRunnable.java:108)
at java.lang.Thread.run(Thread.java:479)
####<Sep 19, 2006 10:31:21 AM CDT> <Debug> <TLS> <USDLLSTX015VQ09> <ehip_server> <hasManagedServices> <kernel identity> <> <000000> <NEW ALERT: com.certicom.tls.record.alert.Alert@30b5a0 Severity: 2 Type: 40>
java.lang.Exception: Stack trace
at weblogic.security.utils.SSLSetup.debug(SSLSetup.java:237)
at com.certicom.tls.record.alert.Alert.<init>(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at javax.net.ssl.impl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:244)
at org.apache.axis.transport.http.HTTPSender.getSecureSocket(HTTPSender.java:156)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:116)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1373)
at net.verio.powerportal.util.GMPSoapClient.invokeCall(GMPSoapClient.java:109)
at net.verio.powerportal.util.GMPSoapClient.execute(GMPSoapClient.java:73)
at net.verio.powerportal.ejb.ars.ARSResourceBean.getSevenSpaceFlag(ARSResourceBean.java:3420)
at net.verio.powerportal.ejb.ars.ARSResourceBean_vdkfgg_EOImpl.getSevenSpaceFlag(ARSResourceBean_vdkfgg_EOImpl.java:802)
at net.verio.ehip.processor.CustomerDashboardThreadProcessor.hasManagedServices(CustomerDashboardThreadProcessor.java:892)
at java.lang.reflect.Method.invoke(Native Method)
at net.verio.ehip.thread.GenericRunnable.run(GenericRunnable.java:108)
at java.lang.Thread.run(Thread.java:479)
####<Sep 19, 2006 10:31:22 AM CDT> <Info> <JDBC> <USDLLSTX015VQ09> <ehip_server> <checkISSflag> <kernel identity> <> <001068> <Connection for pool "ArsCP" created.>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.
 
Similar Threads
weblogic 8.1 SSL configuration.
Weblogic 7.0 SSL Client
SSL Error while connecting to https
javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from
Urgent! (Very IMP) Implementing client on SSL in webservices!!!