users@glassfish.java.net

Re: Enable SSL in embedded glassfish?

From: Bhavanishankar <bshankar_at_sun.com>
Date: Wed, 10 Nov 2010 15:43:18 +0530

Thanks for reporting. I have filed an issue 14572
<https://glassfish.dev.java.net/issues/show_bug.cgi?id=14572> on your
behalf, and fixed it in latest v3.1 workspace (should be available in
next nightly build).

With that, you will be able to create https listeners in embedded
glassfish out of the box without requiring to specify path to keystore
or keypass. (Refer to the testcase I uploaded to the issue).

If you explicitly want to pass the keystore, keypass, passwords, etc
while running embedded program, then you may do:

    java -Djavax.net.ssl.keyStore=<keystore.jks file location>
    -D-Djavax.net.ssl.trustStore=<cacerts.jks file location>
    -Djavax.net.ssl.keyStorePassword=password
    -Djavax.net.ssl.trustStorePassword=passwordEmbedGlassFishApp

Note that for embedded APIs in v3.1 onwards, please refer
https://embedded-glassfish.dev.java.net/nonav/apidocs/ until we update
the server guide.

-Bhavani.

On 11/10/2010 02:19 AM, forums_at_java.net wrote:
> I have reviewed the domain.xml spec and searched all over but cannot find
> how to enabled an https listener via domain.xml config only. All the
> examples
> talk about using asadmin to create one, but I am using embedded version.
> Does anyone have examples of domain.xml entries that show how to
> specify the
> path to my keystore, keypass, etc? It seems possible because with some
> fiddling I know that is trying to startup SSL
>
> WARNING: SSL support could not be configured!
> java.io.IOException: Failed to load keystore type JKS with path null
> due to
> null at
> com.sun.grizzly.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:333)
>
> ...
>
> so how do I specify that path?
>
> thanks
>
>
> --
>
> [Message sent by forum member 'davidbenkirk']
>
> View Post: http://forums.java.net/node/714748
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>