users@grizzly.java.net

GrizzlyWebServer with SSL - Unable to establish SSL connection

From: Igor Minar <iiminar_at_gmail.com>
Date: Fri, 21 Aug 2009 13:28:17 -0700

Hi guys,

I'm trying to start GrizzlyWebServer with SSL turned on, but it
doesn't seem to work for me.

My code is very simple:

public class TestSslServer {
     public static void main(String[] args) throws IOException {
         GrizzlyWebServer gws = new GrizzlyWebServer(7000, "/var/
tmp/", true);
         gws.setSSLConfig(new SSLConfig());
         gws.start();
     }
}

when I hit the server with: wget --no-check-certificate https://localhost:7000/foo

I get:

--2009-08-21 13:23:02-- https://localhost:7000/foo
Resolving localhost... 127.0.0.1, ::1, fe80::1
Connecting to localhost|127.0.0.1|:7000... connected.
Unable to establish SSL connection.


Similar error is returned from firefox.

I tried grizzly 1.9.15 and 1.9.17 and both return the same result. I'm
on a mac and using jdk6 if it matters.

Am I doing something wrong or is SSL currently broken?

Hubert's blog suggests that I'm not missing anything: http://codemeself.blogspot.com/2009/04/securing-grizzly-web-server.html

cheers,
Igor