Connecting via SSL not working (except from psql) - Mailing list pgsql-admin

From Paul Legato
Subject Connecting via SSL not working (except from psql)
Date
Msg-id 3D4FEF62.2000206@nks.net
Whole thread Raw
List pgsql-admin
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


pgsql-admin by date:

Previous
From: mauroduarte@ig.com.br (Mauro)
Date:
Subject: Installing Postgres
Next
From: "Chad R. Larson"
Date:
Subject: Re: Ouverture d'une session base de