Hi Laurent,
On 16/06/10 16:49, Laurent Garrigues wrote:
> Hello,
>
> I have an autentification error when I try to reach the URI on my browser
> (Firefox).
What kind of authentication error do you get, SSL/certificate or
basic/digest authentication?
If it's just basic/digest authentication, it would help to see how
you've configured the authenticator on the server side.
> When I try to reach this URI from a java client, it works perfectly.
> I use Jetty for solving the CPU problem on my server.
> I don't understand why it works if I use the java client and not if I use the
> browser.Any suggestions?
>
>
> The server code :
>
> -------------------------------------------------------
> /*Création du serveur pour l'HTTPS le port*/
> Server server = component.getServers().add(Protocol.HTTPS, port);
>
> server.getContext().getParameters().add("type", "1");
> Series<Parameter> parameters = server.getContext().getParameters();
>
> /* ajout des paramétres requis pour l'HTTPS */
> parameters.add("sslContextFactory",
> "org.restlet.ext.ssl.PkixSslContextFactory");
(Note that using the the PkixSslContextFactory or the
org.restlet.ext.ssl extension is fine but unnecessary here. The
DefaultSslContextFactory (used by default if you don't specify any
sslContextFactory) should be enough for the settings below.)
> parameters.add("keystorePath",
> prop.getProperty("certificat.emplacement.jks"));
> parameters.add("keystorePassword",
> prop.getProperty("certificat.keystorepassword.jks"));
> parameters.add("keyPassword",
> prop.getProperty("certificat.password.jks"));
> parameters.add("keystoreType", "JKS");
> parameters.add("needClientAuthentication","false");
>
> // création& démarrage de jetty
> HttpsServerHelper jettyServer = new HttpsServerHelper(server);
> jettyServer.start();
You don't need to start the server helper. component.start() will do
this for you. (I'm not sure whether this conflicts.)
> /*ajout de l'application au serveur et demarrage de celui-ci*/
> component.getDefaultHost().attach(new RestletApplication());
> component.start();
Best wishes,
Bruno.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2623432