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