Re: A solution to the SSL customizing problem

From: Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: A solution to the SSL customizing problem
Date: 2004-10-15 14:21:49
Message-ID: 200410151621.49160.kenobi@halifax.rwth-aachen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Friday 15 October 2004 07:28, Oliver Jowett wrote:
> Ulrich Meis wrote:
> > On Friday 15 October 2004 05:35, Oliver Jowett wrote:
> >>This doesn't look right, what is '&urlServer&'?
> >>
> >>>+ Object[] args = { info.getProperty("&urlServer&"),
> >>>info.getProperty("sslfactoryargs") };
> >
> > In parseURL I added a line to set that property to the connection url
> > string without parameters. It's the easiest way I am aware of to get the
> > exact url down to makeSSL. Since parseURL simply splits parameters upon &
> > and doesn't convert escaped &s, I used the &s to make absolutely sure
> > that this property never clashes with a real url parameter - also that
> > wouldn't actually matter. If nothing else, it makes it obvious that this
> > is internal.
>
> Ouch, that's a bit nasty.
>
> Why exactly would a SSLSocketFactory implementation need to know the
> original URL?

That makes it easy to associate a particular getConnection call with a
presented certificate.

But to make the code less nasty, hostname and port might actually do the trick
because that suffices to identify the server that presented the certificate
(since a server only has one cert).

The attached changes provide as first parameter "hostname:port" to the factory
as given in the Properties object, so I removed the &urlServer& thing.

Uli

Attachment Content-Type Size
pgjdbc-custom-ssl3.txt text/plain 6.8 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Markus Schaber 2004-10-15 14:36:37 corba example missing makefile
Previous Message Markus Schaber 2004-10-15 11:37:35 Re: A solution to the SSL customizing problem