Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 915B54759E5 for ; Tue, 6 Aug 2002 11:46:43 -0400 (EDT) Received: from homer.nks.net (homer.nks.net [66.152.21.172]) by postgresql.org (Postfix) with ESMTP id EEE154762DC for ; Tue, 6 Aug 2002 11:46:38 -0400 (EDT) Received: from hoju.nks.net (hoju.nks.net [192.168.1.17]) by homer.nks.net (8.9.3/8.9.3) with ESMTP id LAA17533; Tue, 6 Aug 2002 11:46:43 -0400 Received: from nks.net (battle.nks.net [192.168.1.34]) by hoju.nks.net (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA25052; Tue, 6 Aug 2002 11:46:42 -0400 Message-ID: <3D4FEF62.2000206@nks.net> Date: Tue, 06 Aug 2002 11:46:42 -0400 From: Paul Legato User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Cc: pgsql-jdbc@postgresql.org Subject: Connecting via SSL not working (except from psql) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/36 X-Sequence-Number: 5151 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