Re: Have some problem about the SSL connection by JDBC

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: Have some problem about the SSL connection by JDBC
Дата
Msg-id 40734062.8080704@xythos.com
обсуждение исходный текст
Ответ на Have some problem about the SSL connection by JDBC  (<zhang-x@cnt.mxy.nes.nec.co.jp>)
Список pgsql-jdbc
You need to import the certificate of the server into your default cert
store on the client for a valid ssl handshake to take place.

--Barry


zhang-x@cnt.mxy.nes.nec.co.jp wrote:
> I have some big problem.
> I install these packages in Redhat Enterprise ES3.
> postgresql-7.4.1-1PGDG.i386.rpm
> postgresql-jdbc-7.4.1-1PGDG.i386.rpm
> postgresql-libs-7.4.1-1PGDG.i386.rpm
> postgresql-server-7.4.1-1PGDG.i386.rpm
>
> When I use the ssl connection by JDBC,I have some problem.
> --------------my program----------------
> try{
>   String DBDriver="org.postgresql.Driver";
>   Class.forName(DBDriver);
>   String DBUrl   = "jdbc:postgresql://myserver:50813/mydbname?ssl";
>   String strUser = "user";
>   String strPassword = "user";
>   Connection conn=DriverManager.getConnection(DBUrl,strUser,strPassword);
> ... ....
>   conn.close();
>  }catch(Exception e){
>   out.println(e.getMessage());
>  }
> -------------------Error-------------------------
> An I/O error has occured while flushing the output - Exception:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: No trusted certificate found
> Stack Trace:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: No trusted certificate found
>  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
>  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) .....
> ----------------server log---------------
> could not initialize SSL connection: sslv3 alert certificate unknown
> When I use pgdev.301.jdbc3.jar download from
> http://jdbc.postgresql.org/download.html I get the same error.
> Can anybody help me?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings



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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: blob without largeobject api
Следующее
От:
Дата:
Сообщение: Re: Have some problem about the SSL connection by JDBC