Re: A solution to the SSL customizing problem
От | Ulrich Meis |
---|---|
Тема | Re: A solution to the SSL customizing problem |
Дата | |
Msg-id | 200410140224.56728.kenobi@halifax.rwth-aachen.de обсуждение исходный текст |
Ответ на | A solution to the SSL customizing problem (Ulrich Meis <kenobi@halifax.rwth-aachen.de>) |
Ответы |
Re: A solution to the SSL customizing problem
|
Список | pgsql-jdbc |
Now what I got from the discussion: 1. New URL parameters: sslfactory=a.class.name sslfactoryargs=driver=does,not=care These are forwarded to 2. makeSSL which does something like if (sslfactory!=null) { //sslfactory url parameter factory = instantiated class, handle exceptions } else if (DSfactory!=null) { // factory set via DataSource factory = dsfactory; } else factory = SSLSocketFactory.getDefault(); if (factory instanceof PGSSLHandler) { ((PGSSLHandler)factory).setPGURL(...); ((PGSSLHandler)factory).setPGargs(...); } java.net.Socket newConnection = factory.createsocket(....); .... 3. a new abstract class abstract PGSSLHandler extends SSLSocketFactory { public void setPGURL(String url_no_parameters); public void setPGargs(String args); } 4. in Driver protected setSSLSocketFactory(SSLSocketfactory factory) { DSfactory=factory; } 5. in BaseDataSource public void setPG_SSLSocketFactory(SSLSocketFactory factory) { ((org.postgresql.Driver)DriverManager.getDriver("jdbc:postgresql://server/db")).setSSLSocketFactory(factory); } How does that sound? I would offer a concrete implementation unless someone else wants to do it and if I knew you're interested. Uli
В списке pgsql-jdbc по дате отправления: