Connecting via SSL not working (except from psql)
Connecting via SSL not working (except from psql)
От:
Paul Legato <plegato@nks.net>
Дата:
Hi, I'm trying to connect to SSL-enabled Postgres (started with -i -l) using both the openssl command line utility and with a modified JDBC driver using the built in JSSE API from Java 1.4. If I attempt to connect from a shell with the openssl test utility, I get: $ openssl s_client -connect localhost:5432 CONNECTED(00000003) 25870:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:460: With the JDBC driver, at connection I get: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? In both cases, the server logs the message "FATAL 1: invalid length of startup packet". A connection to the server with psql works fine, and prints "SSL connection (cipher: DES-CBC3-SHA, bits: 168)" at startup. I've tried manually specifying this cipher to openssl, which does not change the result. I'm stuck. Any suggestions or pointers will be greatly appreciated. :) Thanks, -Paul