@@ -781,7 +781,7 @@ PGPing PQping(const char *conninfo);
781
781
<listitem>
782
782
<para>
783
783
<function>PQsetSSLKeyPassHook_OpenSSL</function> lets an application override
784
- <literal >libpq</literal >'s <link linkend="libpq-ssl-clientcert">default
784
+ <application >libpq</application >'s <link linkend="libpq-ssl-clientcert">default
785
785
handling of encrypted client certificate key files</link> using
786
786
<xref linkend="libpq-connect-sslpassword"/> or interactive prompting.
787
787
@@ -793,20 +793,23 @@ void PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook);
793
793
<programlisting>
794
794
int callback_fn(char *buf, int size, PGconn *conn);
795
795
</programlisting>
796
- which <literal>libpq</literal> will then call <emphasis>instead of</emphasis>
797
- its default <function>PQdefaultSSLKeyPassHook_OpenSSL</function> handler. The callback
798
- should determine the password for the key and copy it to result-buffer
799
- <literal>buf</literal> of size <literal>size</literal>. The string in <literal>
800
- buf</literal> must be null-terminated. The callback must return the length of
801
- the password stored in <literal>buf</literal> excluding the null terminator.
802
- On failure, the callback should set <literal>buf[0] = '\0'</literal> and return 0.
803
- See <function>PQdefaultSSLKeyPassHook_OpenSSL</function> in <literal>libpq</literal>'s
804
- source code for an example.
805
- </para>
806
-
796
+ which <application>libpq</application> will then call
797
+ <emphasis>instead of</emphasis> its default
798
+ <function>PQdefaultSSLKeyPassHook_OpenSSL</function> handler. The
799
+ callback should determine the password for the key and copy it to
800
+ result-buffer <parameter>buf</parameter> of size
801
+ <parameter>size</parameter>. The string in <parameter>buf</parameter>
802
+ must be null-terminated. The callback must return the length of the
803
+ password stored in <parameter>buf</parameter> excluding the null
804
+ terminator. On failure, the callback should set
805
+ <literal>buf[0] = '\0'</literal> and return 0. See
806
+ <function>PQdefaultSSLKeyPassHook_OpenSSL</function> in
807
+ <application>libpq</application>'s source code for an example.
808
+ </para>
809
+
807
810
<para>
808
811
If the user specified an explicit key location,
809
- its path will be in <literal>conn->pgsslkey </literal> when the callback
812
+ its path will be in <literal>conn->sslkey </literal> when the callback
810
813
is invoked. This will be empty if the default key path is being used.
811
814
For keys that are engine specifiers, it is up to engine implementations
812
815
whether they use the OpenSSL password callback or define their own handling.
0 commit comments