PQConnectdb SSL (sslmode): Is this a bug

Поиск
Список
Период
Сортировка
От vishal saberwal
Тема PQConnectdb SSL (sslmode): Is this a bug
Дата
Msg-id 3e74dc2505082610233671fedf@mail.gmail.com
обсуждение исходный текст
Ответы Re: PQConnectdb SSL (sslmode): Is this a bug  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
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

CODE
---------------------------
PGConn* connection=PQconnectdb("hostaddr=192.168.200.10 dbname=dbm
user=postgres sslmode=prefer");
if (PQstatus(connection)==CONNECTION_OK)
return 0;
else
{
fprintf(stderr. "connection failure: %s",PQerrorMessage(connection));
return -1;
}
--------------
OUTPUT:
connection failure: SSL error: sslv3 alert handshake failure

-----------

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

I do have (ssl=true) 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-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Serials jumping
Следующее
От: Chris Travers
Дата:
Сообщение: Re: Postgresql replication