Re: [PATCH] Accept IP addresses in server certificate SANs

From: Jacob Champion <pchampion(at)vmware(dot)com>
To: "daniel(at)yesql(dot)se" <daniel(at)yesql(dot)se>, "peter(dot)eisentraut(at)enterprisedb(dot)com" <peter(dot)eisentraut(at)enterprisedb(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "stark(at)mit(dot)edu" <stark(at)mit(dot)edu>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "horikyota(dot)ntt(at)gmail(dot)com" <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: [PATCH] Accept IP addresses in server certificate SANs
Date: 2022-03-31 18:15:25
Message-ID: bf8ab04e2fcd8a8fdb2a49229e3bc8a952248eb7.camel@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2022-03-31 at 16:32 +0200, Peter Eisentraut wrote:
> Why add a (failry complicated) pg_inet_pton() when a perfectly
> reasonable inet_pton() exists?

I think it was mostly just that inet_aton() and pg_inet_net_ntop() both
had ports, and I figured I might as well port the other one since we
already had the implementation. (I don't have a good intuition yet for
the community's preference for port vs dependency.)

> I would get rid of all that refactoring and just have your code call
> inet_pton()/inet_ntop() directly.
>
> If you're worried about portability, and you don't want to go through
> the effort of proving libpgport substitutes, just have your code raise
> an error in the "#else" code paths. We can fill that in later if there
> is demand.

Switched to inet_pton() in v12, with no #if/else for now. I think this
should work with Winsock as-is; let's see if the bot agrees...

Thanks,
--Jacob

Attachment Content-Type Size
v12-0001-libpq-allow-IP-address-SANs-in-server-certs.patch text/x-patch 49.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-03-31 18:19:53 Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations
Previous Message Robert Haas 2022-03-31 18:12:20 Re: pgsql: Add 'basebackup_to_shell' contrib module.