[Webtest] need help: javax.net.ssl.SSLException: untrusted server cert chain

Siegfried Göschl webtest@lists.canoo.com
Sun, 18 May 2003 13:12:26 +0200


Maybe this helps 

http://212.186.79.132/webtest/ssl.html

Cheers,

Siegfried Goeschl

On 17 May 2003 at 9:15, cowden@charter.net wrote:

> Hello:
> 
> I'm using canoo for the first time, and must say being an avid ANT
> user it is very nice!
> 
> anyway, I was able to get up and running with my first test in about
> 10 minutes, but have run into an SSL snag-- I get this exception
> submitting a form that uses a secure URL:
> 
> Exception raised: com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught: untr usted server cert
> chaincom.canoo.webtest.engine.StepExecutionException: Unexpected
> exception caught:
>  untrusted server cert chain
>         at
> com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:237)
>         at
> com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.jav
> a:141)
>         at
> com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java
> :91)
>    <full trace below>
> 
> Running Ant in verbose mode, here is the underlying root cause:
> 
>  [testSpec] javax.net.ssl.SSLException: untrusted server cert chain
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198]
> )
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPro
> -V1.2- 120198])
>    <full trace below>
> 
> I know that I need to import this certificate into my keystore, but
> I'm not exectly sure how to do that when I dont have the remote
> server's certificate to install. how do I get it? Also, is there a way
> to get WebTest to automatically accept certificates issued by trusted
> authorities?
> 
> Full Traces are below.
> Thanks!
> Dave
> 
> 
> <<Full Exception Stack Traces>>
> Exception raised: com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught: untr usted server cert
> chaincom.canoo.webtest.engine.StepExecutionException: Unexpected
> exception caught:
>  untrusted server cert chain
>         at
> com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:237)
>         at
> com.canoo.webtest.steps.request.ClickButton.gotoTarget(ClickButton.jav
> a:141)
>         at
> com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java
> :91)
>         at com.canoo.webtest.steps.Step.execute(Step.java:56)
>         at
>         com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
>         at
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationT
> ask.ja va:55)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
>         at org.apache.tools.ant.Task.perform(Task.java:317)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at org.apache.tools.ant.Target.performTasks(Target.java:334)
>         at
>         org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>         at
>         org.apache.tools.ant.Project.executeTargets(Project.java:1250)
>         at org.apache.tools.ant.Main.runBuild(Main.java:610) at
>         org.apache.tools.ant.Main.start(Main.java:196) at
>         org.apache.tools.ant.Main.main(Main.java:235)
> 
>  [testSpec] javax.net.ssl.SSLException: untrusted server cert chain
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198]
> )
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPro
> -V1.2- 120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.Handshaker.process_record([DashoPro-V1.2-
> 120198 ])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.AppOutputStream.write([DashoPro-V1.2-1201
> 98])
>  [testSpec]     at java.io.OutputStream.write(OutputStream.java:61)
>  [testSpec]     at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V1
> .2-120 198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([Das
> hoPro- V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([
> DashoP ro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.
> 2-1201 98])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>([DashoPr
> o-V1.2 -120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>([DashoP
> ro-V1. 2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1
> .2-120 198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1
> .2-120 198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect
> ([Dash oPro-V1.2-120198])
>  [testSpec]     at
> com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getOutp
> utStre am([DashoPro-V1.2-120198])
>  [testSpec]     at
> com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBo
> dyWebR equest.java:96)
>  [testSpec]     at
> com.meterware.httpunit.WebConversation.newResponse(WebConversation.jav
> a:65)
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>