Forum Discussion

jliu16's avatar
13 years ago

javax.net.ssl.SSLHandshakeException: java.security.cert.Cer

Hi all, I installed soapUI Pro 4.5.1 and when running testcase against a webservice, an SSL handshakeException occurred. Any idea how this can be addressed? Thanks in advance.

The stacktrace is here:
Wed Sep 12 10:17:50 EDT 2012:INFO:initialized soapui-settings from [C:\Documents and Settings\JLIU\soapui-settings.xml]
Wed Sep 12 10:17:51 EDT 2012:INFO:Setting Script Library to [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\scripts]
Wed Sep 12 10:17:51 EDT 2012:INFO:Adding listeners from [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\listeners\demo-listeners.xml]
Wed Sep 12 10:17:54 EDT 2012:INFO:Loading workspace from [C:\Documents and Settings\JLIU\default-soapui-workspace.xml]
Wed Sep 12 10:17:54 EDT 2012:INFO:Loaded project from [file:/C:/Documents%20and%20Settings/JLIU/Desktop/VoiceMailService-Hicksville-QA2-soapui-project_09112012.xml]
Wed Sep 12 10:17:56 EDT 2012:INFO:Used java version: 1.7.0_02
Scheduling garbage collection every 60 seconds
Wed Sep 12 10:17:58 EDT 2012:INFO:Adding actions from [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\actions\demo-actions.xml]
The cajo server is running on localhost:1198/soapuiIntegration
Wed Sep 12 10:18:28 EDT 2012:DEBUG:Loading Definition...
Wed Sep 12 10:18:28 EDT 2012:DEBUG:Loading WSDL: https://PathToWSDL
Wed Sep 12 10:18:28 EDT 2012:DEBUG:Returning baseInputSource [https://PathToWSDL]
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
Wed Sep 12 10:18:28 EDT 2012:INFO:Added default schema from file:/C:/Program%20Files/SmartBear/soapUI-Pro-4.5.1/lib/soapui-4.5.1.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
Wed Sep 12 10:18:28 EDT 2012:INFO:Loading schema types from [https://PathToWSDL]
Wed Sep 12 10:18:28 EDT 2012:INFO:Getting schema https://PathToWSDL
Wed Sep 12 10:18:28 EDT 2012:DEBUG:Loaded Definition: ok.
.
.
.
Wed Sep 12 10:18:42 EDT 2012:DEBUG:I/O error closing connection
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
at sun.security.ssl.SSLSocketImpl.checkEOF(Unknown Source)
at sun.security.ssl.SSLSocketImpl.checkWrite(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:138)
at org.apache.http.impl.conn.LoggingSessionOutputBuffer.flush(LoggingSessionOutputBuffer.java:95)
at org.apache.http.impl.AbstractHttpClientConnection.doFlush(AbstractHttpClientConnection.java:270)
at org.apache.http.impl.SocketHttpClientConnection.close(SocketHttpClientConnection.java:245)
at org.apache.http.impl.conn.DefaultClientConnection.close(DefaultClientConnection.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.close(AbstractPooledConnAdapter.java:152)
at org.apache.http.protocol.HttpRequestExecutor.closeConnection(HttpRequestExecutor.java:142)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:129)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:236)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:345)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:241)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
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.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:151)
at org.apache.http.impl.conn.LoggingSessionOutputBuffer.write(LoggingSessionOutputBuffer.java:74)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:114)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:120)
at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:68)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:113)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
... 14 more
Caused by: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
at sun.security.ssl.AbstractTrustManagerWrapper.checkAdditionalTrust(Unknown Source)
at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(Unknown Source)
... 36 more
Wed Sep 12 10:18:42 EDT 2012:DEBUG:Closing the connection.
Wed Sep 12 10:18:42 EDT 2012:DEBUG:Connection closed
Wed Sep 12 10:18:42 EDT 2012:DEBUG:Connection shut down
Wed Sep 12 10:18:42 EDT 2012:ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
Wed Sep 12 10:18:42 EDT 2012:ERROR:An error occured [java.security.cert.CertificateException: Certificates does not conform to algorithm constraints], see error log for details
Wed Sep 12 10:18:42 EDT 2012:INFO:Error getting response for [VoiceMailServicesPort.ArchiveMailBox:Request 1]; javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
  • ankyeez's avatar
    ankyeez
    Occasional Contributor
    You need to add a certificate to this project in the keystores. And the select that cert in the ssl certificate property at the rest service request test step in your test case. then try to run the entire test case. Hope this helps!

    Thanks,
    Ankit
  • I have a fix for users using SoapUI 4.5.1 and getting the java.security.cert.CertificateException: Certificates does not conform to algorithm constraints error for certs that were previously working.

    1. Navigate to C:\Program Files (x86)\SmartBear\soapUI-Pro-4.5.1\jre\lib\security or where ever you have it installed
    2. Open java.security file
    3. Comment out line jdk.certpath.disabledAlgorithms=MD2 so should look like #jdk.certpath.disabledAlgorithms=MD2
    4. Save and restart the application if open.

    Also did it at the main jre at C:\Program Files (x86)\Java\jre7\lib\security