|
|
Sponsor |
Re: SSL without verifying server certificate: msg#00174db.postgresql.jdbc
Kris Jurka wrote: > Java's ssl implementation requires authenticating the server I > believe. I think a better question to ask would be if there was any > way to programmatically supply the server's certificate instead of > having to import it into the cert. Unfortunately I don't know the > answer to that question. IIRC, the place to look in modern versions of the J2SDK is javax.net.X509TrustManager. You can specify an X509TrustManager when you call SSLContext.init. You'd then need to get an SSLSocketFactory from that SSLContext and finally create a socket using that SocketFactory. Currently, org.postgresql.Driver.makeSSL obtains a default SSLSocketFactory by calling the static method SSLSocketFactory.getDefault(). What we'd ideally do here is leave that default in place, but allow a client to specify a different SSLSocketFactory somehow. All the dealing with X509TrustManager and SSLContext could be left to the application code, since the right way to do it is highly app-specific and security-sensitive. Any opinions on the best way to specify that SSLSocketFactory? Sticking with URL parameters is unworkable, since we would like to specify a specific instance obtained from the SSLContext, *not* a class name for a whole set of these things. We could add a method to Driver or to PGConnection, perhaps? -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: SSL without verifying server certificate, Kris Jurka |
|---|---|
| Next by Date: | Re: isSingleXXX in AbstractJdbc1Statement, Chris Smith |
| Previous by Thread: | Re: SSL without verifying server certificate, Kris Jurka |
| Next by Thread: | JDBC encodng - like problemöäü, E. Zorn (blue2) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|