Re: Trouble setting up ssl cert authentication from java/hibernate

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Trouble setting up ssl cert authentication from java/hibernate
Дата
Msg-id 4EB25AED.3030109@ringerc.id.au
обсуждение исходный текст
Ответ на Trouble setting up ssl cert authentication from java/hibernate  (Magosányi Árpád <mag@magwas.rulez.org>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "magwas@rabic.org"
Дата:
Сообщение: Re: Trouble setting up ssl cert authentication from java/hibernate
Следующее
От: "Johann 'Myrkraverk' Oskarsson"
Дата:
Сообщение: Re: Fwd: [BUGS] BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe