tags:

views:

204

answers:

4

I have a server written (self written - no Tomcat or Jetty) in Java and it works nicely, but now I want it to work with HTTPS as well, but I really don't get what I need to do. I've read some stuff online, but haven't really found a good explanation for what I need to do.

Could anybody give me an useful hint (or a small outline) of what needs to be done so HTTPS works?

+3  A: 

You can use an http to https proxy, or an SSL proxy like stunnel, in front of your java server. That way you do not have to modify it.

 Browser ---(HTTPS)---> Proxy ---(HTTP)---> YourServer

The proxy can run an the same system as the web server, will handle the encryption stuff, and connect locally to the webserver. That way you offer both HTTP and HTTPS on the same host.

philippe
Could you explain that a little bit more? Sounds good to me.
doro
+2  A: 

This is probably a good starting point: Secure Internet Programming [java.sun.com]

I'll try to cater the answer better to your needs once you supply more information.

dborba
Thnx, that might be a link that could help very much. I'll look through it.
doro
A: 

What server are you using for your application? Tomcat, Jetty, and others each have different methods for configuring SSL support.

jsight
Hey, sorry, that I didn't make it clear: we wrote it ourselves ... It's not a server you can find anywhere. We used the Java-classes for that.
doro
A: 

to give a short answer to my own question:

the sslcontext has to be configured correctly ...

doro
*shakes head* if the answer is not helpful, asking might help ...
doro