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#.UkqtrN9lvyM > > > > 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.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