pgsql: Support Subject Alternative Names in SSL server certificates.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support Subject Alternative Names in SSL server certificates.
Date: 2014-09-12 14:20:11
Message-ID: E1XSRhr-0001UJ-NR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Support Subject Alternative Names in SSL server certificates.

This patch makes libpq check the server's hostname against DNS names listed
in the X509 subjectAltName extension field in the server certificate. This
allows the same certificate to be used for multiple domain names. If there
are no SANs in the certificate, the Common Name field is used, like before
this patch. If both are given, the Common Name is ignored. That is a bit
surprising, but that's the behavior mandated by the relevant RFCs, and it's
also what the common web browsers do.

This also adds a libpq_ngettext helper macro to allow plural messages to be
translated in libpq. Apparently this happened to be the first plural message
in libpq, so it was not needed before.

Alexey Klyukin, with some kibitzing by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/acd08d764a361dcebd346227281ff0ca62b60936

Modified Files
--------------
src/interfaces/libpq/fe-misc.c | 18 ++-
src/interfaces/libpq/fe-secure-openssl.c | 238 +++++++++++++++++++++++-------
src/interfaces/libpq/libpq-int.h | 4 +
3 files changed, 202 insertions(+), 58 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2014-09-12 14:40:37 pgsql: Support ALTER SYSTEM RESET command.
Previous Message Heikki Linnakangas 2014-09-12 08:39:03 pgsql: Fix GIN data page split ratio calculation.