pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: colin.anderson333+pgsql@gmail.com
Subject: BUG #15137: X509 auth breaks in CA has extendedKeyUsage
Date: Fri, 30 Mar 2018 13:11:29 +0000
Message-ID: <152241548992.6324.5143838178015534589@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15137
Logged by:          cocowalla
Email address:      colin.anderson333+pgsql@gmail.com
PostgreSQL version: 10.2
Operating system:   Debian
Description:        

I've setup my own X509 CA for testing. If the `extendedKeyUsage` flags is
set to a custom OID in the CA certificate, Postgres is unable to verify any
client certificates.

I see this in the logs, and clients cannot connect:

  Could not accept SSL connection: certificate verify failed

Sample openssl config snippet:

[ ca_extensions ]
basicConstraints       = CA:true
subjectKeyIdentifier   = hash
authorityKeyIdentifier = keyid:always, issuer:always
keyUsage               = keyCertSign,cRLSign,digitalSignature
extendedKeyUsage       = 1.3.6.1.4.1.12345.1.2

And the command used to generate the CA:
openssl req -new -x509 -sha256 -subj
"/O=Acme/OU=Acme/emailAddress=support@acme.com/CN=MyCA" -keyout "CA.key"
-out "CA.crt" -days 7300 -newkey rsa:2048 -extensions ca_extensions



Message-ID: <152241548992.6324.5143838178015534589@wrigleys.postgresql.org>
Permalink:  ../152241548992.6324.5143838178015534589@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/152241548992.6324.5143838178015534589@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, colin.anderson333+pgsql@gmail.com
  Subject: Re: BUG #15137: X509 auth breaks in CA has extendedKeyUsage
  In-Reply-To: <152241548992.6324.5143838178015534589@wrigleys.postgresql.org>
  References: <152241548992.6324.5143838178015534589@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox