docs: clarify SSL certificate authority chain docs
authorBruce Momjian
Fri, 6 Dec 2013 14:42:08 +0000 (09:42 -0500)
committerBruce Momjian
Fri, 6 Dec 2013 14:42:08 +0000 (09:42 -0500)
Previously, the requirements of how intermediate certificates were
handled and their chain to root certificates was unclear.

doc/src/sgml/libpq.sgml
doc/src/sgml/runtime.sgml

index 503a63a58bdc9c544ef58cb2fcaa92f2ead28388..15bc42cd61c58a34c77d00edf827e8a0e58e20cc 100644 (file)
@@ -7122,7 +7122,9 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
    To allow server certificate verification, the certificate(s) of one or more
    trusted CAs must be
    placed in the file ~/.postgresql/root.crt in the user's home
-   directory. (On Microsoft Windows the file is named
+   directory. If intermediate CAs appear in
+   root.crt, the file must also contain certificate
+   chains to their root CAs. (On Microsoft Windows the file is named
    %APPDATA%\postgresql\root.crt.)
   
 
@@ -7180,15 +7182,15 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
    intermediate certificate authority, rather than one that is
    directly trusted by the server.  To use such a certificate, append the
    certificate of the signing authority to the postgresql.crt
-   file, then its parent authority's certificate, and so on up to a
-   root authority that is trusted by the server.  The root
-   certificate should be included in every case where
-   postgresql.crt contains more than one certificate.
+   file, then its parent authority's certificate, and so on up to a certificate
+   authority, root or intermediate, that is trusted by
+   the server, i.e. signed by a certificate in the server's
+   root.crt file.
   
 
   
-   Note that root.crt lists the top-level CAs that are
-   considered trusted for signing server certificates.  In principle it need
+   Note that the client's ~/.postgresql/root.crt lists the top-level CAs 
+   that are considered trusted for signing server certificates.  In principle it need
    not list the CA that signed the client's certificate, though in most cases
    that CA would also be trusted for server certificates.
   
index ab51782a7c16c63c18f4d073c978650d07e52841..491683730e0e161e82ed22cb047fdee8b80774ea 100644 (file)
@@ -1986,10 +1986,10 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
    intermediate certificate authority, rather than one that is
    directly trusted by clients.  To use such a certificate, append the
    certificate of the signing authority to the server.crt file,
-   then its parent authority's certificate, and so on up to a root
-   authority that is trusted by the clients.  The root certificate should
-   be included in every case where server.crt contains more than
-   one certificate.
+   then its parent authority's certificate, and so on up to a certificate
+   authorityroot or intermediate, that is trusted by
+   clients, i.e. signed by a certificate in the clients'
+   root.crt files.
   
 
   
@@ -2008,7 +2008,10 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
    SSL connection startup.  (See  for a
    description of how to set up certificates on the client.)  The server will
    verify that the client's certificate is signed by one of the trusted
-   certificate authorities.  Certificate Revocation List (CRL) entries
+   certificate authorities.  If intermediate CAs appear in
+   root.crt, the file must also contain certificate
+   chains to their root CAs.  Certificate Revocation List
+   (CRL) entries
    are also checked if the parameter  is set.
    
    (See 
@@ -2026,8 +2029,9 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   
 
   
-   Note that root.crt lists the top-level CAs that are
-   considered trusted for signing client certificates.  In principle it need
+   Note that the server's root.crt lists the top-level
+   CAs that are considered trusted for signing client certificates.
+   In principle it need
    not list the CA that signed the server's certificate, though in most cases
    that CA would also be trusted for client certificates.