HTTPS Jetty SSL [message #90269] |
Tue, 12 June 2007 08:33 |
Eclipse User |
|
|
|
Originally posted by: baptiste.routhieau.reseau.eseo.fr
Hello,
I have an equinox framework launched with this bundles:
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070430
4 ACTIVE org.apache.commons.logging_1.0.4.v200701082340
5 ACTIVE org.eclipse.equinox.http.jetty_1.0.0.v20070427
6 ACTIVE org.eclipse.equinox.http.servlet_1.0.0.v20070402
7 ACTIVE org.eclipse.osgi.services_3.1.100.v20060918
8 ACTIVE javax.servlet_2.4.0.v200704241052
9 ACTIVE org.mortbay.jetty_5.1.11.v200701082340
12 ACTIVE it.cnr.isti.niche.osgi.upnp.baseextra_1.0.0
14 ACTIVE it.cnr.isti.niche.osgi.upnp.basedriver_3.0.2
17 ACTIVE Servlet1_1.0.1
18 ACTIVE Servlet2_1.0.0
Actualy I can see my servlet with this address : http://localhost/servlet1/ & http://localhost/servlet2/
I need to add a secure http (https) in order to access after authentication with this address:
https://localhost/servlet1/ & https://localhost/servlet2/
What I need to do ?
Thanks
|
|
|
|
Re: HTTPS Jetty SSL [message #90391 is a reply to message #90360] |
Wed, 13 June 2007 07:51 |
Eclipse User |
|
|
|
Originally posted by: baptiste.routhieau.reseau.eseo.fr
Thanks,
I generate my keystore with keytools and I try to add in equinox the following parameters:
setprop org.eclipse.equinox.http.jetty.https.enabled=true
setprop org.eclipse.equinox.http.jetty.ssl.keystore=c:\keystore
setprop org.eclipse.equinox.http.jetty.ssl.password=password
setprop org.eclipse.equinox.http.jetty.ssl.keypassword=password
I restart the framework, and now I have this error:
13 juin 2007 09:44:34 org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.x
13 juin 2007 09:44:34 org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.servlet.ServletHandler@482923
13 juin 2007 09:44:34 org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
13 juin 2007 09:44:34 org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:80
<b>13 juin 2007 09:44:34 org.mortbay.util.FileResource <clinit>
INFO: Checking Resource aliases
13 juin 2007 09:44:34 org.mortbay.util.ThreadedServer start
ATTENTION: Failed to start: SslListener1@0.0.0.0:443</b>
And now my jetty bundle doesn't start...
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
12 ACTIVE it.cnr.isti.niche.osgi.upnp.baseextra_1.0.0
14 ACTIVE it.cnr.isti.niche.osgi.upnp.basedriver_3.0.2
18 ACTIVE CapLight_1.0.0
30 ACTIVE org.apache.commons.logging_1.0.4.v200705231731
31 ACTIVE DomoCap_1.0.1
33 ACTIVE javax.servlet_2.4.0.v200705291052
34 ACTIVE org.eclipse.osgi.services_3.1.200.v20070605
35 ACTIVE org.eclipse.equinox.http.servlet_1.0.0.v20070606
<b>36 RESOLVED org.eclipse.equinox.http.jetty_1.0.0.v20070607</b>
37 ACTIVE org.mortbay.jetty_5.1.11.v200706061611
Maybe the framework doesn't found the keystore... Must I copy it in the jetty.jar file ???
|
|
|
Re: HTTPS Jetty SSL [message #90406 is a reply to message #90391] |
Wed, 13 June 2007 09:45 |
Eclipse User |
|
|
|
Originally posted by: baptiste.routhieau.reseau.eseo.fr
It's ok I found my error, I looking in the log files ...
I have the ISS server on on my computer...
Now I want to know how to configure the default configuration ?
When I write my configuration in
workspace\.metadata\.plugins\org.eclipse.pde.core\Equinox\co nfig.ini
the framework overwrite them...
When I write my configuration in
eclipserepertory/configuration/config.ini
the framework doesn't consider them.
|
|
|
Re: HTTPS Jetty SSL [message #90421 is a reply to message #90406] |
Wed, 13 June 2007 13:31 |
Eclipse User |
|
|
|
Originally posted by: baptiste.routhieau.reseau.eseo.fr
Ok I need client authentication on my server, and I start it with this line.
setprop org.eclipse.equinox.http.jetty.ssl.needclientauth=true
When I restart my framework I get this error.
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.http.jetty.internal.Activator.start() of bundle org.eclipse.equinox.http.jetty.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1018)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.re sumeBundles(PackageAdminImpl.java:266)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.do ResolveBundles(PackageAdminImpl.java:234)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1. run(PackageAdminImpl.java:164)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.cr eateHttpsListener(HttpServerManager.java:196)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:83)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Acti vator.java:52)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
... 8 more
Root exception:
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.cr eateHttpsListener(HttpServerManager.java:196)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager.up dated(HttpServerManager.java:83)
at org.eclipse.equinox.http.jetty.internal.Activator.start(Acti vator.java:52)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.re sumeBundles(PackageAdminImpl.java:266)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.do ResolveBundles(PackageAdminImpl.java:234)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1. run(PackageAdminImpl.java:164)
at java.lang.Thread.run(Unknown Source)
The error come from this code in HttpServerManager.class (debug mode)
String needClientAuth = (String) dictionary.get(SSL_NEEDCLIENTAUTH);
if (needClientAuth != null)
listener.setNeedClientAuth(Boolean.valueOf(needClientAuth).b ooleanValue());
It's a bug ? Because dictionary.get(SSL_NEEDCLIENTAUTH) it's a Boolean and the error is natural because we can't cast a boolean to a string.
|
|
|
|
Re: HTTPS Jetty SSL [message #90449 is a reply to message #90435] |
Wed, 13 June 2007 16:04 |
Eclipse User |
|
|
|
Originally posted by: baptiste.routhieau.reseau.eseo.fr
Ok thanks,
I write a solution after downloading the CVS Project.
Boolean needClientAuth = (Boolean) dictionary.get(SSL_NEEDCLIENTAUTH);
if (needClientAuth != null)
listener.setNeedClientAuth(needClientAuth.booleanValue());
It's the same bug for SSL_WANTCLIENTAUTH.
|
|
|
Powered by
FUDForum. Page generated in 0.05905 seconds