Potentially misleading name of libpq pass phrase hook
От
Daniel Gustafsson
Тема
Potentially misleading name of libpq pass phrase hook
Дата
Msg-id
981DE552-E399-45C2-9F60-3F0E3770CC61@yesql.se
Список
Дерево обсуждения
Potentially misleading name of libpq pass phrase hook Daniel Gustafsson <daniel@yesql.se>
Re: Potentially misleading name of libpq pass phrase hook Magnus Hagander <magnus@hagander.net>
Re: Potentially misleading name of libpq pass phrase hook Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Potentially misleading name of libpq pass phrase hook Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Potentially misleading name of libpq pass phrase hook Tom Lane <tgl@sss.pgh.pa.us>
Re: Potentially misleading name of libpq pass phrase hook "Jonathan S. Katz" <jkatz@postgresql.org>
Re: Potentially misleading name of libpq pass phrase hook Michael Paquier <michael@paquier.xyz>
Re: Potentially misleading name of libpq pass phrase hook Daniel Gustafsson <daniel@yesql.se>
Re: Potentially misleading name of libpq pass phrase hook Tom Lane <tgl@sss.pgh.pa.us>
Re: Potentially misleading name of libpq pass phrase hook Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Potentially misleading name of libpq pass phrase hook "Jonathan S. Katz" <jkatz@postgresql.org>
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__type would be one option, but perhaps there are better alternatives? Thoughts? cheers ./daniel
В списке pgsql-hackers по дате отправления
От: Ashutosh Bapat
Дата: