Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A26CB632414 for ; Wed, 14 Apr 2010 23:06:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 18583-06 for ; Thu, 15 Apr 2010 02:06:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 1B41F6323F2 for ; Wed, 14 Apr 2010 23:06:30 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o3F26U427784; Wed, 14 Apr 2010 22:06:30 -0400 (EDT) From: Bruce Momjian Message-Id: <201004150206.o3F26U427784@momjian.us> Subject: Re: PostgreSQL with SSL In-Reply-To: To: Jose Berardo Date: Wed, 14 Apr 2010 22:06:30 -0400 (EDT) CC: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.041 tagged_above=-10 required=5 tests=AWL=-0.131, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/185 X-Sequence-Number: 34279 Jose Berardo wrote: > Hi, > > I'm new on using SSL in PostgreSQL. > > I've created a self-signed certificate using openssl and started the server > with ssl suport. > > But I have some question, can you help me? > > - There is any parameter to configure the path (and name) to certificate > (server.crt) and private key (server.key) like hba_file or ident_file in > postgresql.conf or any other? No, we only allow those fixed file names. > - Is it possible to store the server.key in a ciphered file with triple-des > and configure the PostgreSQL to use a simetric-key to open it when it's > necessary? > Maybe I'm wrong but my server only works with I plain private key. No. > I'm trying to use the java keytool in place of openssl. > - I believe that it not possible to start the PostgreSQL server without > openssl (and ssl-dev package in debian), is it correct? Yes, I don't think the java keytool works. > - When I create keys and certificates with keytool, it creates a java > keystore to store everything. I know how to export the certificate but I > don't know how to export the private key and when I use the keytool > certificate, the server crashes with this message: > > FATAL: could not load server certificate file "server.crt": no start line > > Sorry about too many questions, but anyone can help me to understand more > about ssl in PostgreSQL? Have you read the documentation about creating a server key? http://www.postgresql.org/docs/8.4/static/ssl-tcp.html -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com