Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DC6E22E30B0 for ; Sun, 3 Feb 2008 17:20:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 58350-01 for ; Sun, 3 Feb 2008 17:20:07 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by postgresql.org (Postfix) with ESMTP id 84DAE2E309A for ; Sun, 3 Feb 2008 17:20:07 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so2234473waf.5 for ; Sun, 03 Feb 2008 13:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=hDm9W5lPqRclPucumEdTPWc0r3YXSpYEljtypbJKQPA=; b=i6HZIigVvD1H2z7nQqqY/3+7pFcYpNi+INchQ+1IqfXtf1HcmZO33AY8yfANOCKsJ2m4bg0o8M/AFm5yC30fEKfLLMPmhfJpXl3zwx1jRCoAwAC59QQVSJOiVx7DXbnUIvSMYslZmFYW776uGoDZWKLmFB/0XYFTPb2KBA6n3aw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=xvAN+F3slpY8Mf8rZY/cm+kqW+p1WXAdrqSzccLQwLYobKcYTRIigz+60goMXMMx0IbFpFi1jNb2ylYAPzIITMKYv5yR3l9rVohbuBJ4rl/0QJTvkBrDL/Zme77RJUrX/6rG3GqnzG3ST1xbxfWrn6z/yAavtvLYW8pGsrYlCCw= Received: by 10.114.167.2 with SMTP id p2mr6217407wae.78.1202073605969; Sun, 03 Feb 2008 13:20:05 -0800 (PST) Received: by 10.114.199.4 with HTTP; Sun, 3 Feb 2008 13:20:05 -0800 (PST) Message-ID: <4544e0330802031320l46448362wbc5bf73fec5374e7@mail.gmail.com> Date: Sun, 3 Feb 2008 15:20:05 -0600 From: "Peter Koczan" To: "Bronson, Allan B. (Mission Systems)" Subject: Re: SSL question Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/10 X-Sequence-Number: 28084 On Feb 1, 2008 9:08 AM, Bronson, Allan B. (Mission Systems) wrote: > I am trying to create a SSl connection to PostGres using JDBC and am not > sure if it is working. > > I read that you must have openssl on the client machine for the connection > to take place. I have turned ssl = on in the config file, created a cert > and key file and placed them in the correct directory, created a truststore > and add the ?ssl=true to the url for the client. When I do all this I > connect and get data back from the db. My confusion is when I read that I > need openssl on the client machine to connect, since I can connect without > openssl installed. I do notice that if my truststore does not have the cert > placed in it, I get an error saying missing certificate ( something like > that ), does that mean ssl is working for the client and server? > > I am using Postgres 8.2 and have read that I may need to compile the > Postgres src code with openssl for it to be enabled. Is this correct or is > SSL already compiled into the src code? > > Thanks to anyone who can provide information or point me in the right > direction. I am facing a tight deadline and don't have a ton of extra time > to research this more. I think you do need to compile PostgreSQL with SSL support. If you're getting a vendor-made package (a .rpm or .deb, for instance), you should do a little As far as JDBC goes, check out http://jdbc.postgresql.org/documentation/82/ssl.html (though it sounds like you already have). I'm trying to get SSL support working with JDBC as well, and I've found that guide very good. Don't forget to edit your server's pg_hba.conf to allow or force ssl-based connections, as well. You should also ask your question on the JDBC list. They focus exclusively on that and will be best able to help you. Hope this helps. Peter