pgsql: Support Subject Alternative Names in SSL server certificates. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Support Subject Alternative Names in SSL server certificates.
Date
Msg-id E1XSRhr-0001UJ-NR@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix GIN data page split ratio calculation.
Next
From: Fujii Masao
Date:
Subject: pgsql: Support ALTER SYSTEM RESET command.