Re: [PoC] Federated Authn/z with OAUTHBEARER - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: [PoC] Federated Authn/z with OAUTHBEARER
Date
Msg-id CAOYmi+mEkXu9Jfg9v-5z9DmBCRCMS2dt43Z=TCbgVkbrqJXxRg@mail.gmail.com
Whole thread Raw
In response to Re: [PoC] Federated Authn/z with OAUTHBEARER  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: [PoC] Federated Authn/z with OAUTHBEARER
List pgsql-hackers
On Thu, Jan 9, 2025 at 8:17 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> Maybe it would work to just use plain "int" as the type here.  Any
> socket number must fit into int anyway in order for PQsocket() to be
> able to return it.  The way I understand Windows socket handles, this
> should work.

Looks like it should work for current Windows, yeah. This is the
approach taken by OpenSSL [1].

It'd be sad to copy-paste the API bug into a new place, though. If
we're going to disconnect this API from SOCKET, can we use uintptr_t
instead on Windows? If someone eventually adds an alternative to
PQsocket(), as Tom suggested in [2], it'd be nice not to have to
duplicate this callback too.

--Jacob

[1] https://docs.openssl.org/3.4/man3/SSL_set_fd/#notes
[2] https://www.postgresql.org/message-id/153442.1624889951%40sss.pgh.pa.us



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Psql meta-command conninfo+
Next
From: Sami Imseih
Date:
Subject: Re: Psql meta-command conninfo+