webrick, ssl and non-ssl on the same port

P

Pavel Smerk

Hello all,

I have sslized webrick server, but I'd like to have some parts of server
accessible even without ssl. I've tried to search web and groups, but
I haven't found anything --- any suggestions, how to get ssl and nonssl
servlets on the same port?

Thanks in advance,

P.
 
R

Robert Klemme

Hello all,

I have sslized webrick server, but I'd like to have some parts of server
accessible even without ssl. I've tried to search web and groups, but I
haven't found anything --- any suggestions, how to get ssl and nonssl
servlets on the same port?

You could search the web for SSL protocl. I believe after connection
some message is sent in the clear to indicate SSL is to be used. You
could evaluate that and go on from there.

However, I don't think it's worth the effort. Note that HTTPS and HTTP
use different ports by default anyway. It's certainly far easier to
open port 443 on the FW.

Kind regards

robert
 
F

Francis Cianfrocca

Hello all,

I have sslized webrick server, but I'd like to have some parts of server
accessible even without ssl. I've tried to search web and groups, but
I haven't found anything --- any suggestions, how to get ssl and nonssl
servlets on the same port?

Thanks in advance,

P.

what I think you're proposing is not usually done for web sites. Do
you want to open a server port and have it automatically detect an
SSL/TLS client-hello so you can do an SSL handshake if present, and
simply serve the connection with no encryption otherwise? If you do
that, then how do you ensure that people will use encryption on the
sensitive pages? It's a lot of additional logic to make that happen.
Just use two ports.
 
M

Michal Suchanek

what I think you're proposing is not usually done for web sites. Do
you want to open a server port and have it automatically detect an
SSL/TLS client-hello so you can do an SSL handshake if present, and
simply serve the connection with no encryption otherwise? If you do
that, then how do you ensure that people will use encryption on the
sensitive pages? It's a lot of additional logic to make that happen.
Just use two ports.

The page is either available through http or https - these are two
different URLs. So the request should get to the right type of
service.

Of course it is simpler to use two ports (and it is the default
anyway, you would have to use a port number with either http or https
to get them use the same port). But it is an interesting idea
nontheless.

Thanks

Michal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top