Hi Jevon,
I've seen that post but they seemed to have the same problem as I have.
I can't change the server certificate as proposed.

I also found this post 
http://stackoverflow.com/questions/13022717/java-and-https-url-connection-without-downloading-certificate
with a test program which I can use to read from my site!

I've tried to adapt that code to JWebUnit but have not yet succeeded.
/Gunnar



-----Original Message-----
From: Jevon Wright [mailto:je...@jevon.org] 
Sent: den 2 oktober 2013 01:23
To: Usage problems for JWebUnit
Subject: Re: [JWebUnit-users] Testing site with self-signed certificate

Hi Gunnar,

There was a post a few months ago about this very issue - check out 
http://sourceforge.net/mailarchive/forum.php?thread_name=CAENZhnUEH2DUUVXvwKr5CS1FofMWdO3ZN3HGxUG2LXse4fd3EA%40mail.gmail.com&forum_name=jwebunit-users
and see if this helps.

Cheers
Jevon


On Wed, Oct 2, 2013 at 12:22 AM, Gunnar.Bostrom <gunnar.bost...@tieto.com> 
wrote:
> Hi,
>
> How can I test a site with a self signed certificate?
>
> First I got a problem with:
>
> java.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: 
> peer not authenticated
>
>
>
> I found and implemented XTrustProvider as in :
>
> https://devcentral.f5.com/articles/ssl-trust-provider-for-java#.UkqtrN
> 9lvyM
>
>
>
> Then I got java.lang.RuntimeException: javax.net.ssl.SSLException: 
> hostname in certificate didn't match: <TEST_SERVER_IP> != <unknown>
>
>
>
> I tried added the following code in my @BeforeClass method but the 
> verify method is never called:
>
> HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
>
>             @Override
>
>             public boolean verify(String hostname, SSLSession session) 
> {
>
>                         return true;
>
>             }
>
> });
>
>
>
> What can I do?
>
> /Gunnar
>
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- October Webinars: Code for Performance Free Intel webinars 
> can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the 
> most from the latest Intel processors and coprocessors. See abstracts 
> and register > 
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.c
> lktrk _______________________________________________
> JWebUnit-users mailing list
> JWebUnit-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register > 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to