ssl problem with postgres 8.0

Started by Luca Stancapianoover 20 years ago2 messagesgeneral
Jump to latest
#1Luca Stancapiano
l.stancapiano@k-tech.it

hello.....I use postgresql 8.0 . I've created the server.key and
server.crt in this manner:

openssl req -new -nodes -keyout server.key -out server.csr

openssl req -x509 -key /home/data/server.key -in /home/data/server.csr -out
server.crt

and I put theese in my data home.

I launch postgres in this manner:

postmaster -il -p '$PGPORT' -D '$PGDATA_LOCAL' ${PGOPTS} &

and postgres starts fine. When I try to connect to myself in this mode:

psql -h localhost

I have this error:

psql: could not open certificate file "/root/.postgresql/postgresql.crt":
No such file or directory

my pg_hba.conf is:

local all all ident sameuser
hostssl all all 0.0.0.0 0.0.0.0 md5

may anyone tell me where I wrong?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Luca Stancapiano (#1)
Re: ssl problem with postgres 8.0

"Luca Stancapiano" <l.stancapiano@k-tech.it> writes:

I have this error:
psql: could not open certificate file "/root/.postgresql/postgresql.crt":
No such file or directory

You need a client certificate (if you don't want the server demanding
client certificates, remove its root.crt file). See
http://www.postgresql.org/docs/8.0/static/libpq-ssl.html
http://www.postgresql.org/docs/8.0/static/ssl-tcp.html

regards, tom lane