From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Potentially misleading name of libpq pass phrase hook |
Date: | 2020-05-15 21:46:38 |
Message-ID: | CABUevExmcr0yso8T5E4qP-FQeJX9TKwaPmnTVsGBtj2HDR_9pg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 14, 2020 at 3:03 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> Reviewing TLS changes for v13 I came across one change which I think might
> be
> better off with a library qualified name. The libpq frontend sslpassword
> hook
> added in 4dc63552109f65 is OpenSSL specific, but it has a very generic
> name:
>
> PQsetSSLKeyPassHook(PQsslKeyPassHook_type hook);
>
> This IMO has potential for confusion if we ever commit another TLS backend,
> since the above hook wont work for any other library (except maybe OpenSSL
> derivatives like LibreSSL et.al). The backends will always have
> differently
> named hooks, as the signatures will be different, but having one with a
> generic
> name and another with a library qualified name doesn't seem too friendly to
> anyone implementing with libpq.
>
> As a point of reference; in the backend we added a TLS init hook in commit
> 896fcdb230e72 which also is specific to OpenSSL, but the name is library
> qualified making the purpose and usecase perfectly clear:
> openssl_tls_init_hook.
>
> Since we haven't shipped this there is still time to rename, which IMO is
> the
> right way forward. PQsslKeyPassHook_<library>_type would be one option,
> but
> perhaps there are better alternatives?
>
> Thoughts?
>
>
ISTM this should be renamed yeah -- and it should probably go on the open
item lists, and with the schedule for the beta perhaps dealt with rather
urgently?
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-05-15 21:52:57 | Re: Multiple FPI_FOR_HINT for the same block during killing btree index items |
Previous Message | Daniel Gustafsson | 2020-05-15 20:46:09 | Support for NSS as a libpq TLS backend |