pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ssl connection and webstart
4+ messages / 3 participants
[nested] [flat]

* ssl connection and webstart
@ 2007-11-28 14:50 Michael Andreasen <michael@dunlops.com>
  2007-11-29 09:42 ` Re: ssl connection and webstart Albe Laurenz <laurenz.albe@wien.gv.at>
  2007-11-29 09:58 ` Re: ssl connection and webstart Donald Fraser <postgres@kiwi-fraser.net>
  2007-11-29 10:00 ` Re: ssl connection and webstart Donald Fraser <postgres@kiwi-fraser.net>
  0 siblings, 3 replies; 4+ messages in thread

From: Michael Andreasen @ 2007-11-28 14:50 UTC (permalink / raw)
  To: pgsql-jdbc

I have a postgresql database up and running will ssl support in, this works
fine.

I have a certificate that I have added via the command line to my jvm. once
this is added my applications connects via ssl to my database perfectly.

However, what i really want to do is to deploy my application via webstart.
In order to do this i would have though that the certificate needs to be
added to the clients pc via the certificate manager which is part of the
Java Plug/Webstart tool that exists in the control panel. I have tried
repeated times to add the certificate this way, and although it seems to
import fine, the application always fails and reports the same error as if
there was no certificate. If I then manually add the cert to the vm using
the command line tools it works!!!

How can I add the cert via webstart so a "user" can do this?

Anyone else tried ssl and webstart?

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: ssl connection and webstart
  2007-11-28 14:50 ssl connection and webstart Michael Andreasen <michael@dunlops.com>
@ 2007-11-29 09:42 ` Albe Laurenz <laurenz.albe@wien.gv.at>
  2 siblings, 0 replies; 4+ messages in thread

From: Albe Laurenz @ 2007-11-29 09:42 UTC (permalink / raw)
  To: Michael Andreasen *EXTERN* <michael@dunlops.com>; pgsql-jdbc

Michael Andreasen wrote:
> I have a postgresql database up and running will ssl support 
> in, this works fine.
> 
> I have a certificate that I have added via the command line 
> to my jvm. once this is added my applications connects via 
> ssl to my database perfectly. 
> 
> However, what i really want to do is to deploy my application 
> via webstart. In order to do this i would have though that 
> the certificate needs to be added to the clients pc via the 
> certificate manager which is part of the Java Plug/Webstart 
> tool that exists in the control panel. I have tried repeated 
> times to add the certificate this way, and although it seems 
> to import fine, the application always fails and reports the 
> same error as if there was no certificate. If I then manually 
> add the cert to the vm using the command line tools it works!!! 
> 
> How can I add the cert via webstart so a "user" can do this?
> 
> Anyone else tried ssl and webstart?

This is not a direct answer to your question, but do you really
want client certificates or are you just looking for some way
to connect with JDBC using SSL?

If it is the latter, you could save the effort of distributing
client certificates by using

sslfactory=org.postgresql.ssl.NonValidatingFactor

in the JDBC URL.

Yours,
Laurenz Albe



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: ssl connection and webstart
  2007-11-28 14:50 ssl connection and webstart Michael Andreasen <michael@dunlops.com>
@ 2007-11-29 09:58 ` Donald Fraser <postgres@kiwi-fraser.net>
  2 siblings, 0 replies; 4+ messages in thread

From: Donald Fraser @ 2007-11-29 09:58 UTC (permalink / raw)
  To: pgsql-jdbc

>How can I add the cert via webstart so a "user" can do this?

Are you using any standard certificates from the default certificate key 
store?

If the answer is no, then one idea is to create your own certificate key 
store in your software and add your certificate with java code.
You do this as part of creating your SSLSocketFactory, see attached example.
And then when your application starts up, the first thing you do before 
making any connections to postgresql database is:
java.security.Security.setProperty("ssl.SocketFactory.provider", 
"MyOrganisation.MyClientApp.ssl.MySSLSocketFactory");

Hope that helps.
Regards
Donald Fraser




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: ssl connection and webstart
  2007-11-28 14:50 ssl connection and webstart Michael Andreasen <michael@dunlops.com>
@ 2007-11-29 10:00 ` Donald Fraser <postgres@kiwi-fraser.net>
  2 siblings, 0 replies; 4+ messages in thread

From: Donald Fraser @ 2007-11-29 10:00 UTC (permalink / raw)
  To: pgsql-jdbc

>How can I add the cert via webstart so a "user" can do this?

Are you using any standard certificates from the default certificate key
store?

If the answer is no, then one idea is to create your own certificate key
store in your software and add your certificate with java code.
You do this as part of creating your SSLSocketFactory, see attached example.
And then when your application starts up, the first thing you do before
making any connections to postgresql database is:
java.security.Security.setProperty("ssl.SocketFactory.provider",
"MyOrganisation.MyClientApp.ssl.MySSLSocketFactory");

Hope that helps.
Regards
Donald Fraser

Attachments:

  MySSLSocketFactory.java (application/octet-stream, 7.3K) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-11-29 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28 14:50 ssl connection and webstart Michael Andreasen <michael@dunlops.com>
2007-11-29 09:42 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2007-11-29 09:58 ` Donald Fraser <postgres@kiwi-fraser.net>
2007-11-29 10:00 ` Donald Fraser <postgres@kiwi-fraser.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox