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

Richard Hill webtest@lists.canoo.com
Mon, 19 May 2003 13:49:25 -0700


The javax.net lib comes with a debug/tracing tool that let's you see all the
ssl handshaking. One way to use it is to setup an ANT_OPTS environment
variable with the value -Djavax.net.debug=all

You can set this up in your Linux .bashrc file like this:

ANT_OPTS="-Djavax.net.debug=all"
export ANT_OPTS

or just include it in your ant build file.

- Richard Hill

-----Original Message-----
From: cowden@charter.net [mailto:cowden@charter.net]
Sent: Saturday, May 17, 2003 6:16 AM
To: webtest@gate.canoo.com
Subject: [Webtest] need help: javax.net.ssl.SSLException: untrusted
server cert chain


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.java: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.java: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(TestSpecificationTask.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-120198])
 [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([DashoPro-
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>([DashoPro-V1.2
-120198])
 [testSpec]     at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>([DashoPro-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.getOutputStre
am([DashoPro-V1.2-120198])
 [testSpec]     at
com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebR
equest.java:96)
 [testSpec]     at
com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:65)

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest