Re: Creating Certificates - Mailing list pgsql-docs
From | Bruce Momjian |
---|---|
Subject | Re: Creating Certificates |
Date | |
Msg-id | 20181013183824.GB13042@momjian.us Whole thread Raw |
In response to | Creating Certificates (Tatsuo Ishii <ishii@sraoss.co.jp>) |
List | pgsql-docs |
On Sat, Oct 6, 2018 at 08:17:04AM +0900, Tatsuo Ishii wrote: > In "18.9.3. Creating Certificates", > > ------------------------------------------------------------------ > To create a server certificate whose identity can be validated by > clients, first create a certificate signing request (CSR) and a > public/private key file: > > openssl req -new -nodes -text -out root.csr \ > -keyout root.key -subj "/CN=root.yourdomain.com" > chmod og-rwx root.key > > Then, sign the request with the key to create a root certificate > authority (using the default OpenSSL configuration file location on > Linux): > > openssl x509 -req -in root.csr -text -days 3650 \ > -extfile /etc/ssl/openssl.cnf -extensions v3_ca \ > -signkey root.key -out root.crt > ------------------------------------------------------------------ > > For me it seesm the two-step procedure can be replaced with following > one command: > > openssl req -new -x509 -nodes -text -days 3650 \ > -config /etc/ssl/openssl.cnf -extensions v3_ca \ > -out root.crt -keyout root.key -subj "/CN=root.yourdomain.com" > > Is there any reason why our doc recommend the two-step procedure? This was changed as part of this commit: commit 815f84aa166de294b80e80cc456b79128592720e Author: Bruce Momjian <bruce@momjian.us> Date: Sat Jan 20 21:47:02 2018 -0500 doc: update intermediate certificate instructions Document how to properly create root and intermediate certificates using v3_ca extensions and where to place intermediate certificates so they are properly transferred to the remote side with the leaf certificate to link to the remote root certificate. This corrects docs that used to say that intermediate certificates must be stored with the root certificate. Also add instructions on how to create root, intermediate, and leaf certificates. Discussion: https://postgr.es/m/20180116002238.GC12724@momjian.us Reviewed-by: Michael Paquier Backpatch-through: 9.3 The reason I did this in two steps was so I could explain each step independently, and because the next paragraph, "create a server certificate signed by the new root certificate authority", also requires two steps. My goal was that the first command in each example creates the CSR and public key pair, and the second command signs it. If the first example uses only one command, and the second example needs to use two commands, and it appears more complex. I guess we could show the single-command example as an alternative, but that seems more complex too. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
pgsql-docs by date: