Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new
Date: 2008-11-24 21:26:41
Message-ID: 200811242326.42296.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Monday 24 November 2008 16:55:17 Magnus Hagander wrote:
> > Then again, having looked into the libpq source now, is using fnmatch()
> > even appropriate here? The matching rules for https are in RFC 2818:

> > Using fnmatch(), however, will also treat ? and [] special and it will
> > not follow the "any single domain name component" rule.

> I guess it's back to the drawingboard. Can probably still base it on the
> fnmatch stuff, but it'll need to be ripped apart. Basically, it should
> match only with *, and * should not match "." - do you agree that's a
> reasonable interpretation?

Some more information on this:
https://www.switch.ch/pki/meetings/2007-01/namebased_ssl_virtualhosts.pdf
slide 5 lists the matching rules for email, HTTP, and LDAP over TLS,
respectively, which are not all the same. Also note that these methods have
rules for interpreting fields in the certificate other than the common name
for the host name.

I think it is safest and easiest to allow a * wildcard only as the first
character and only when followed immediately by a dot.

Maybe some DNS expert around here can offer advice on what a morally sound
solution would be.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2008-11-24 21:30:14 Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new
Previous Message Magnus Hagander 2008-11-24 19:19:46 pgsql: Disable FNM_CASEFOLD.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-11-24 21:28:58 Re: WIP: default values for function parameters
Previous Message Pavel Stehule 2008-11-24 21:21:15 Re: WIP: default values for function parameters