PQconnectdb SSL (sslmode) - Mailing list pgsql-bugs

From vishal saberwal
Subject PQconnectdb SSL (sslmode)
Date
Msg-id 3e74dc2505082518204bf8afe8@mail.gmail.com
Whole thread Raw
In response to Re: Ref: BUG#1321: SSL error: sslv3 alert handshake failure  (vishal saberwal <vishalsaberwal@gmail.com>)
Responses Re: PQconnectdb SSL (sslmode)
List pgsql-bugs
hi,
I am not sure if this is a bug.

My PG_HBA.CONF
----------------------------
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all 192.168.0.0/16 trust
hostssl dbm all 192.168.200.201 255.255.255.255 md5

int ret=3DPQconnectdb("hostaddr=3D192.168.200.10 dbname=3Ddbm user=3Dpostgr=
es
sslmode=3Dprefer");

' ret' prints -1.

Now when I change the above function to one with sslmode=3Dallow, the
connection is established and query runs.

I do have (ssl=3Dtrue) in postgresql.conf and have tested the
certificates and they are working right. I also restart the postmaster
after every change in postgresql.conf and pg_hba.conf.

I would prefer the connections are SSL and hence would like to use the
default "prefer" sslmode.

vish

pgsql-bugs by date:

Previous
From: vishal saberwal
Date:
Subject: Re: Ref: BUG#1321: SSL error: sslv3 alert handshake failure
Next
From: vishal saberwal
Date:
Subject: Re: Ref: BUG#1321: SSL error: sslv3 alert handshake failure