Re: PostgreSQL with SSL - Mailing list pgsql-admin

From Martin Münstermann
Subject Re: PostgreSQL with SSL
Date
Msg-id 20100415074542.137300@gmx.net
Whole thread Raw
In response to Re: PostgreSQL with SSL  (Bruce Momjian <bruce@momjian.us>)
Responses Re: PostgreSQL with SSL  (Jose Berardo <joseberardo@gmail.com>)
List pgsql-admin
Hello.

> > 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

It is important that the server.crt and server.key files are in so-called PEM format.
So they have to be text files and look like:

-----BEGIN CERTIFICATE-----
<some base64 encoded data>
-----END CERTIFICATE-----

and

-----BEGIN RSA PRIVATE KEY-----
<some base64 encoded data>
-----END RSA PRIVATE KEY-----

This is the default format produced by openssl.
The private key format is also openssl-specific, so probably you are out of luck with keytool.

Regards,
 Martin

--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL with SSL
Next
From: "Thorne, Francis"
Date:
Subject: AIX Postgres Compile Error