From: Kevin Brown Date: 2006-01-26T18:25:27+09:00 Subject: Re: PostgreSQL in Ruby with SSL connections Alright, here it is. I'm not even client authing yet. Psql connects just fine and lets me know it's SSLing the connection. Ruby code from the same machine to the same machine says: # which I can't find anything about using Google. On 1/25/06, Kevin Brown wrote: > I'm using the compiled C extension on Linux. I'll do some more > playing and see what I can make out. Could very well have been world > readable. > > Thanks for your help, and I'll post the result when I've played some more. > > On 1/25/06, Dave Lee wrote: > > On 1/24/06, Kevin Brown wrote: > > > I'd like to use SSL certificate authentication, and that happens > > > transparently? Don't I need to supply a cert? It's not looking in the > > > ~/.postgresql directory for it like psql does...? > > > > If you are using postgres-pr, than I can't comment. If you are using > > the ruby-postgres extension, then it too should be looking in the > > ~/.postgresql directory because, as mentioned by Dick Davies, > > ruby-postgres makes use of libpq, which is what psql uses. The > > documentation regarding ssl support in libpq is at: > > > > http://www.postgresql.org/docs/current/interactive/libpq-ssl.html > > > > which states: > > > > "If the server demands a client certificate, libpq will send the > > certificate stored in file ~/.postgresql/postgresql.crt within the > > user's home directory. A matching private key file > > ~/.postgresql/postgresql.key must also be present, and must not be > > world-readable." > > > > Having said this, I haven't actually used ssl for postgresql > > connections. The documentation regarding ssl with libpq is very > > simple, I'm not sure what could be going wrong in your case. Which > > OS? Which ruby? Which version of ruby-postgres? Maybe you're > > actually using postgres-pr? > > > > Dave > > > > >