|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.230 2007/02/16 03:50:29 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.231 2007/02/16 16:37:29 tgl Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="libpq">
|
4 | 4 | <title><application>libpq</application> - C Library</title>
|
@@ -4178,10 +4178,11 @@ setting, and is only available if
|
4178 | 4178 | <primary><envar>PGSSLKEY</envar></primary>
|
4179 | 4179 | </indexterm>
|
4180 | 4180 | <envar>PGSSLKEY</envar>
|
4181 |
| -specifies the hardware token which stores the secret key for the client |
4182 |
| -certificate, instead of a file. The value of this variable should consist |
| 4181 | +specifies the hardware token that stores the secret key for the client |
| 4182 | +certificate. The value of this variable should consist |
4183 | 4183 | of a colon-separated engine name (engines are <productname>OpenSSL</>
|
4184 |
| -loadable modules) and an engine-specific key identifier. |
| 4184 | +loadable modules) and an engine-specific key identifier. If this is not |
| 4185 | +set, the secret key must be kept in a file. |
4185 | 4186 | </para>
|
4186 | 4187 | </listitem>
|
4187 | 4188 | <listitem>
|
@@ -4450,38 +4451,37 @@ ldap://ldap.mycompany.com/dc=mycompany,dc=com?uniqueMember?one?(cn=mydatabase)
|
4450 | 4451 | for increased security. See <xref linkend="ssl-tcp"> for details
|
4451 | 4452 | about the server-side <acronym>SSL</> functionality.
|
4452 | 4453 | </para>
|
| 4454 | + |
4453 | 4455 | <para>
|
4454 |
| - <application>libpq</application> reads the system-wide |
4455 |
| - <productname>OpenSSL</productname> configuration file. By default, this |
4456 |
| - file is named <filename>openssl.cnf</filename> and is located in the |
4457 |
| - directory reported by <application>openssl</>: |
4458 |
| - <programlisting> |
4459 |
| - openssl version -d |
4460 |
| - </programlisting> |
4461 |
| - The default can be overriden by setting environment variable |
4462 |
| - <envar>OPENSSL_CONF</envar> to the name of the desired configuration |
4463 |
| - file. |
| 4456 | + <application>libpq</application> reads the system-wide |
| 4457 | + <productname>OpenSSL</productname> configuration file. By default, this |
| 4458 | + file is named <filename>openssl.cnf</filename> and is located in the |
| 4459 | + directory reported by <literal>openssl version -d</>. |
| 4460 | + This default can be overridden by setting environment variable |
| 4461 | + <envar>OPENSSL_CONF</envar> to the name of the desired configuration |
| 4462 | + file. |
4464 | 4463 | </para>
|
| 4464 | + |
4465 | 4465 | <para>
|
4466 | 4466 | If the server demands a client certificate,
|
4467 | 4467 | <application>libpq</application>
|
4468 | 4468 | will send the certificate stored in file
|
4469 | 4469 | <filename>~/.postgresql/postgresql.crt</> within the user's home directory.
|
4470 | 4470 | A matching private key file <filename>~/.postgresql/postgresql.key</>
|
4471 |
| - must also be present, and must not be world-readable, unless the secret |
4472 |
| - key is stored in a hardware token, as specified by |
4473 |
| - <envar>PGSSLKEY</envar>. |
| 4471 | + must also be present, unless the secret key for the certificate is stored |
| 4472 | + in a hardware token, as specified by <envar>PGSSLKEY</envar>. |
4474 | 4473 | (On Microsoft Windows these files are named
|
4475 | 4474 | <filename>%APPDATA%\postgresql\postgresql.crt</filename> and
|
4476 | 4475 | <filename>%APPDATA%\postgresql\postgresql.key</filename>.)
|
| 4476 | + The private key file must not be world-readable. |
4477 | 4477 | </para>
|
4478 | 4478 |
|
4479 | 4479 | <para>
|
4480 | 4480 | If the environment variable <envar>PGSSLKEY</envar> is set, its value
|
4481 | 4481 | should consist of a colon-separated engine name and key identifier. In
|
4482 | 4482 | this case, <application>libpq</application> will load the specified
|
4483 | 4483 | engine, i.e. the <productname>OpenSSL</> module which supports special
|
4484 |
| - hardware and reference the key with the specified identifier. |
| 4484 | + hardware, and reference the key with the specified identifier. |
4485 | 4485 | Identifiers are engine-specific. Typically, cryptography hardware tokens
|
4486 | 4486 | do not reveal secret keys to the application. Instead, applications
|
4487 | 4487 | delegate all cryptography operations which require the secret key to
|
|
0 commit comments