Resolving “ssl handshake failure” error in PostgresQL
Posted
by Mitch
on Server Fault
See other posts from Server Fault
or by Mitch
Published on 2009-09-07T20:39:45Z
Indexed on
2010/03/09
8:08 UTC
Read the original article
Hit count: 1186
I would like to connect to my Postgres 8.3 database using SSL from my XP client using OpenSSL. This works fine without SSL. When I try it with SSL (no client certificate), I get the error:
error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure
I have followed the instructions in the Postgres manual for SSL including creating a self-signed certificate. In my pg_hba.conf there is a line:
host dbname loginname 123.45.67.89/32 md5
The version of OpenSSL on the server is 0.9.8g and on the client is 0.9.8j. I'd appreciate any suggestions for tracking down the problem.
Edit:
The uncommented lines from postgresql.conf are:
data_directory = '/var/ebs0/postgres/main'
hba_file = '/etc/postgresql/8.3/main/pg_hba.conf'
ident_file = '/etc/postgresql/8.3/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/8.3-main.pid'
listen_addresses = '*'
port = 5432 max_connections = 100
unix_socket_directory = '/var/run/postgresql'
ssl = true
shared_buffers = 24MB
© Server Fault or respective owner