Hello again
i created a self signed certificate and made it trustable in the cacerts file, using these commands and still when i try to connect i get the same error.
1) REM generate a public/key pair
REM RSA for JDK 1.4. DSA for JDK 1.2, 1.3
keytool -genkey -keyalg RSA -alias phony -dname "CN=mindprod.com, OU=testing, O=Canadian Mind Products, L=Victoria, S=BC, C=CA, [EMAIL PROTECTED]"
REM RSA for JDK 1.4. DSA for JDK 1.2, 1.3
keytool -genkey -keyalg RSA -alias phony -dname "CN=mindprod.com, OU=testing, O=Canadian Mind Products, L=Victoria, S=BC, C=CA, [EMAIL PROTECTED]"
2) REM generate the self-signed certificate
keytool -selfcert -alias phony
keytool -selfcert -alias phony
3) REM export the self-signed certificate in x.509 printable format, public key only.
keytool -export -alias phony -rfc -file phonycert.cer
keytool -export -alias phony -rfc -file phonycert.cer
4) REM import phony certificate into a client cacerts
keytool -import -keystore J:\Program Files\java\jdk1.5.0\jre\lib\security\cacerts -alias phony -file phonycert.cer
keytool -import -keystore J:\Program Files\java\jdk1.5.0\jre\lib\security\cacerts -alias phony -file phonycert.cer
do i have to have the common name point to http://jwebunit.sourceforge.net or something else?as i am getting an SSLexception against net.sourceforge.jwebunit.
for reference the exception is below::
1) testHomePage(reservation.ExampleWebTestCase)java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certif
icate found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getOutputStream(Unknown Source)
at com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebRequest.java:96)
at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:60)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
at com.meterware.httpunit.WebForm.submit(WebForm.java:67)
at com.meterware.httpunit.WebForm.submit(WebForm.java:56)
at net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:542)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:347)
at reservation.ExampleWebTestCase.testHomePage(ExampleWebTestCase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:115)
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(Unknown Source)
at sun.security.validator.SimpleValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
... 41 more
icate found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getOutputStream(Unknown Source)
at com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebRequest.java:96)
at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:60)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
at com.meterware.httpunit.WebForm.submit(WebForm.java:67)
at com.meterware.httpunit.WebForm.submit(WebForm.java:56)
at net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:542)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:347)
at reservation.ExampleWebTestCase.testHomePage(ExampleWebTestCase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:115)
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(Unknown Source)
at sun.security.validator.SimpleValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
... 41 more
at net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:544)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:347)
at reservation.ExampleWebTestCase.testHomePage(ExampleWebTestCase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:115)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:347)
at reservation.ExampleWebTestCase.testHomePage(ExampleWebTestCase.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:115)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
Tests run: 1, Failures: 0, Errors: 1
D:\ccviews\JWebUnit\dec_05\Test\IHGTestHome>
Pradnya Sute <[EMAIL PROTECTED]> wrote:
Hello Martijn,
Thanks for the help, will look into it. I am trying to
test my local webserver and for that i dont know from
where i would get trusted certificates?
Is there any other way by which i could avoid the use
of installing certificates and still make the
connection secure?
-Pradnya
--- Martijn Dashorst <[EMAIL PROTECTED]>wrote:
> Hi,
>
> There have been more troubles using https and
> jwebunit. I suggest you
> look at:
>
>
https://sourceforge.net/tracker/?func=detail&atid=497983&aid=979375&group_id=61302
>
> I hope this helps.
>
> Martijn Dashorst
>
> Sute, Pradnya (ASAP Staffing) wrote:
>
> > I get this error when I submit a form (login) on
> > http://www.ichotelsgroup.com/h/d/pc/1/en/home
> >
> > My test case is:
> >
> > public void testQuickResSubmit()
> >
> > {
> >
> > beginAt("/6c/1/en/home");
> >
> > assertFormPresent("searchForm");
> >
> > setWorkingForm("searchForm");
> >
> > setFormElement("city", "Atlanta");
> >
> > setFormElement("stateId", "GA");
> >
> > setFormElement("countryId","0001");
> >
> > setFormElement("checkInDate","11");
> >
> > setFormElement("checkOutDate","12");
> >
> > setFormElement("checkInMonthYear","72005");
> >
> > submit("smartQuickSearch");
> >
> > }
> >
> > 1)
> >
>
testHomePage(reservation.ExampleWebTestCase)java.lang.RuntimeException:
> > javax.net.ssl.SSLHandshakeException:
> sun.security.validator.Validato
> >
> > icate found
> >
> > at
>
com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown
> > Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown
> Source)
> >
> > at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown
> Source)
> >
> > at
> >
>
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
> Source)
> >
> > at
>
sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
> > Source)
> >
> > at
> >
>
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
> > Source)
> >
> > at
> >
>
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
> > Source)
> >
> > at
> >
>
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getOutputStream(Unknown
> > Source)
> >
> > at
> >
>
com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebRequest.java:96)
> >
> > at
> >
>
com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:60)
> >
> > at
> >
>
com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
> ; >
> > at
> >
>
com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
> >
> > at
> >
>
com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
> >
> > at
> >
>
com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
> >
> > at
> >
>
com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
> >
> > at
> >
>
com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
> >
> > at
>
com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
> >
> > at
>
com.meterware.httpunit.WebForm.submit(WebForm.java:67)
> >
> > at
>
com.meterware.httpunit.WebForm.submit(WebForm.java:56)
> >
> > at
> >
>
net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:542)
> >
> > at
>
net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
> >
> > at
> >
>
net.sourceforge.jwebunit.WebTestCase.submit(WebTestCase.java:347)
> >
> > at
> >
>
reservation.ExampleWebTestCase.testHomePage(ExampleWebTestCase.java:29)
> >
> > at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> >
> > at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
> >
> > at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> >
> > at
>
reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:69)
> >
> > Caused by:
> sun.security.validator.ValidatorException: No
> trusted
> > certifica te found
> >
> > at
> >
>
sun.security.validator.SimpleValidator.buildTrustedChain(Unknown
> Source)
> >
> > at
> >
>
sun.security.validator.SimpleValidator.engineValidate(Unknown
> Source)
> >
> > at
> sun.security.validator.Validator.validate(Unknown
> Source)
> >
> > at
> >
>
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
