Fix bugs in OpenSSL hook renaming.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 23:44:49 +0000 (19:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 23:44:49 +0000 (19:44 -0400)
libpq's exports.txt was overlooked in commit 36d108761, which the
buildfarm is quite unhappy about.

Also, I'd gathered that the plan included renaming PQgetSSLKeyPassHook
to PQgetSSLKeyPassHook_OpenSSL, but that didn't happen in the patch
as committed.  I'm taking it on my own authority to do so now, since
the window before beta1 is closing fast.

doc/src/sgml/libpq.sgml
src/interfaces/libpq/exports.txt
src/interfaces/libpq/fe-secure-openssl.c
src/interfaces/libpq/libpq-fe.h

index ca9aa623a24aee085cbdf93cc07f796da10f8146..52631f458ffe78d48285e01507cc6c9ef22937b1 100644 (file)
@@ -776,7 +776,7 @@ PGPing PQping(const char *conninfo);
      </listitem>
     </varlistentry>
 
-    <varlistentry id="libpq-pqsetsslkeypasshook">
+    <varlistentry id="libpq-pqsetsslkeypasshook-openssl">
      <term><function>PQsetSSLKeyPassHook_OpenSSL</function><indexterm><primary>PQsetSSLKeyPassHook_OpenSSL</primary></indexterm></term>
      <listitem>
       <para>
@@ -826,16 +826,16 @@ int callback_fn(char *buf, int size, PGconn *conn);
      </listitem>
     </varlistentry>
 
-    <varlistentry id="libpq-pqgetsslkeypasshook">
-     <term><function>PQgetSSLKeyPassHook</function><indexterm><primary>PQgetSSLKeyPassHook</primary></indexterm></term>
+    <varlistentry id="libpq-pqgetsslkeypasshook-openssl">
+     <term><function>PQgetSSLKeyPassHook_OpenSSL</function><indexterm><primary>PQgetSSLKeyPassHook_OpenSSL</primary></indexterm></term>
      <listitem>
       <para>
-       <function>PQgetSSLKeyPassHook</function> returns the current
+       <function>PQgetSSLKeyPassHook_OpenSSL</function> returns the current
        client certificate key password hook, or <literal>NULL</literal>
        if none has been set.
 
 <synopsis>
-PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook(void);
+PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
 </synopsis>
       </para>
 
@@ -7670,7 +7670,8 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
    OpenSSL with a <literal>Enter PEM pass phrase:</literal>
    prompt if a TTY is available. Applications can override the client certificate
    prompt and the handling of the <literal>sslpassword</literal> parameter by supplying
-   their own key password callback; see <xref linkend="libpq-pqsetsslkeypasshook"/>.
+   their own key password callback; see
+   <xref linkend="libpq-pqsetsslkeypasshook-openssl"/>.
   </para>
 
   <para>
index 5fc1e5d28946d1497d98dc323442575dbcd9d572..bbc1f9048167b16f96b05c61adf6eebb9a8be048 100644 (file)
@@ -176,6 +176,6 @@ PQresultMemorySize        173
 PQhostaddr                174
 PQgssEncInUse             175
 PQgetgssctx               176
-PQsetSSLKeyPassHook          177
-PQgetSSLKeyPassHook          178
-PQdefaultSSLKeyPassHook      179
+PQsetSSLKeyPassHook_OpenSSL         177
+PQgetSSLKeyPassHook_OpenSSL         178
+PQdefaultSSLKeyPassHook_OpenSSL     179
index 7d45fbf86b97ccc5cd54d8a89abf6876db6d55d8..68823a04d65d4dfc4bf783ed82c1ae26b2925f16 100644 (file)
@@ -1687,7 +1687,7 @@ PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
 }
 
 PQsslKeyPassHook_OpenSSL_type
-PQgetSSLKeyPassHook(void)
+PQgetSSLKeyPassHook_OpenSSL(void)
 {
    return PQsslKeyPassHook;
 }
index f104bbfa4a4014fdb756a1f16b9a3d57692c0e81..3b6a9fbce35584ae45edd991c3c319188309fca9 100644 (file)
@@ -621,7 +621,7 @@ extern int  pg_valid_server_encoding_id(int encoding);
 
 /* Support for overriding sslpassword handling with a callback. */
 typedef int (*PQsslKeyPassHook_OpenSSL_type) (char *buf, int size, PGconn *conn);
-extern PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook(void);
+extern PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
 extern void PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook);
 extern int PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn);