From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Magosányi Árpád <mag(at)magwas(dot)rulez(dot)org> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Trouble setting up ssl cert authentication from java/hibernate |
Date: | 2011-11-03 09:12:13 |
Message-ID: | 4EB25AED.3030109@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 11/02/2011 09:45 PM, Magosányi Árpád wrote:
> The juice of my test case:
> String password = new PasswordDialog(new Shell()).ask();
> System.out.println("keystore
> path="+System.getProperty("javax.net.ssl.trustStore"));
> File keystorepath = new File(System.getProperty("user.home"),".keystore");
> System.setProperty("javax.net.ssl.trustStore",keystorepath.getAbsolutePath());
You must set the javax.net.ssl system properties before *any* SSL code
is run. They're read once and after that changes to them are ignored.
If you set them on the java command line instead of in code, does it use
the certificate and key you provide then?
BTW, I'd also like to see the cert auth factory integrated into PgJDBC.
It's seen some testing, and the best way to get that kind of code tested
more broadly is get it into use.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Gary Kenney | 2011-11-03 16:35:36 | BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe |
Previous Message | magwas@rabic.org | 2011-11-03 07:29:04 | Re: Trouble setting up ssl cert authentication from java/hibernate |