Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-31 Thread vishal saberwal
Why do i have to be the one doing such a silly mistake ... thanks for your help and yes you were right ... this fixed my problem ... thanks, vishOn 8/30/05, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Tue, Aug 30, 2005 at 10:40:26AM -0700, vishal saberwal wrote:> Root user:> /root/.postgressql:Is th

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 10:40:26AM -0700, vishal saberwal wrote: > Root user: > /root/.postgressql: Is this the actual directory name? It's misspelled: it should be ".postgresql", not ".postgressql". -- Michael Fuhr ---(end of broadcast)--- TIP 2

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-30 Thread vishal saberwal
Thanks michael for your response ... I had read the links (you suggested) before, but yes i missed some important points ... hmmm i believe it was me who was wrong again ... I was trying to connect to the server from the same machine server is running on ... well, in this case it has to serve as c

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-29 Thread Michael Fuhr
On Mon, Aug 29, 2005 at 04:23:13PM -0700, vishal saberwal wrote: > now i ran the program i had that has a conect command with ("hostaddr= > 169.254.59.60 dbname=dbm user=postgres > sslmode=prefer") parameters. > > [EMAIL PROTECTED] serv]# ./bin/test_lib > Connection failed:

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-29 Thread vishal saberwal
hi michael and tom, (A) With LIBPQ.SO.3.2 After reading your response i copied the libpq.so.3.2 from the compiled source tree to /usr/lib where the version available was libpq.so.3.1. I recreated the symbolic links and now the links are as below: [EMAIL PROTECTED] DBApi]# ls -l /usr/lib/libpq* -rw

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-29 Thread vishal saberwal
oops i forgot to attach logfile output for the second case (LIBPQ.SO.3.1) : [EMAIL PROTECTED] DBApi]# cat /var/lib/pgsql/logfile LOG:  database system was interrupted at 2005-08-29 15:01:11 PDT LOG:  checkpoint record is at 0/655FF630 LOG:  redo record is at 0/655FF630; undo record is at 0/0; shutd

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread Michael Fuhr
On Fri, Aug 26, 2005 at 02:03:05PM -0700, vishal saberwal wrote: > sorry, but forgot to mention, > when i change to sslmode=allow, it lets me connect and runs my query That's because "allow" attempts a non-SSL connection first, whereas "prefer" attempts an SSL connection first. If the server perm

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread Michael Fuhr
On Fri, Aug 26, 2005 at 01:57:36PM -0700, vishal saberwal wrote: > I am not sure as to how i can find the version of libpq that i am > using on my server. My test file has sslmode=prefer. This is what i > did: > (a) > [EMAIL PROTECTED] serv]# ./bin/test_lib > Connection failed: SSL error: sslv3 al

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread vishal saberwal
hi tom and michael, thanks for your response ... i guess i am not that smart with libraries ... I am not sure as to how i can find the version of libpq that i am using on my server. My test file has sslmode=prefer. This is what i did: (a) [EMAIL PROTECTED] serv]# ./bin/test_lib Connection failed:

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread vishal saberwal
sorry, but forgot to mention, when i change to sslmode=allow, it lets me connect and runs my query on 'select * from test_table' which is a dummy table ... [EMAIL PROTECTED] serv]# ./bin/test_lib ret=0 GOT CONNECTION NAME AGE me

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Is it possible that your program is linked against an old version > of libpq? I can reproduce the above error with an otherwise working > 8.0.3 setup if I link the program against a 7.4.8 libpq. The CVS logs show quite a bit of work done on SSL support b

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread Michael Fuhr
On Fri, Aug 26, 2005 at 10:23:10AM -0700, vishal saberwal wrote: > OUTPUT: > connection failure: SSL error: sslv3 alert handshake failure What appears in the server's log when this happens? > I do have (ssl=true) in postgresql.conf and have tested the > certificates and they are working right. H

[GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-26 Thread vishal saberwal
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("h