Skip site navigation (1) Skip section navigation (2)

Re: SSL use

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "ruel(dot)cima" <ruel(dot)cima(at)facinf(dot)uho(dot)edu(dot)cu>
Cc: php-general(at)lists(dot)php(dot)net, pgsql-novice(at)postgresql(dot)org
Subject: Re: SSL use
Date: 2005-04-22 21:21:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Fri, Apr 22, 2005 at 04:38:29PM -0400, ruel.cima wrote:
>  im handling some important information that needs to be stored in my
>  postgresql database via a php script. i've been reading the mails sent on
>  this mailing list on SSL use. my postgresql server allows SSL connections
>  but im not sure how to make use of like to know more about ssl and
>  how to take advantage of its security features. any references?

The documentation index has a few entries for "SSL".  Here are some
useful links for 8.0:

> from my php script, do i need to make a special connection to the database
> or is the same e.g pg_connect(host= localhost dbname=test user=p
> password=p)?

You could add "sslmode=require" to attempt only an SSL connection.

If the connection should always be encrypted, then you could edit
the server's pg_hba.conf and allow only "hostssl" connections.  In
that case you shouldn't need to specify "sslmode=require" when you
connect, although doing so serves as a safety measure against
pg_hba.conf misconfiguration, and as a reminder that the connection
should be encrypted.

> is my information automatically transfered in an encrypted fashion?

Yes, assuming you've successfully negotiated an SSL connection.  To
be sure, you could use a sniffer like tcpdump or ethereal to look
at the traffic.

Michael Fuhr

In response to

  • SSL use at 2005-04-22 20:38:29 from ruel.cima

pgsql-novice by date

Next:From: -k.Date: 2005-04-22 22:02:25
Subject: Re: [PHP] Re: SSL use
Previous:From: brewDate: 2005-04-22 21:18:38
Subject: Re: CHECK vs BEFORE trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group