1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

doc: Let OpenSSL handle serial file

With -CAcreateserial the serial file will be automatically created
and initialized if it is missing.

Signed-off-by: Lorenz Leutgeb <lorenz.leutgeb@gmail.com>
This commit is contained in:
Lorenz Leutgeb 2015-01-04 21:49:16 +01:00
parent a3d5f874c1
commit 131c62d766

View file

@ -26,10 +26,8 @@ it will only connect to servers with a certificate signed by that CA.
## Create a CA, server and client keys with OpenSSL
First, initialize the CA serial file and generate CA private and public
keys:
First generate CA private and public keys:
$ echo 01 > ca.srl
$ openssl genrsa -aes256 -out ca-key.pem 2048
Generating RSA private key, 2048 bit long modulus
......+++
@ -68,7 +66,7 @@ name) matches the hostname you will use to connect to Docker:
Next, we're going to sign the key with our CA:
$ openssl x509 -req -days 365 -in server.csr -CA ca.pem -CAkey ca-key.pem \
-out server-cert.pem
-CAcreateserial -out server-cert.pem
Signature ok
subject=/CN=your.host.com
Getting CA Private Key
@ -92,7 +90,7 @@ config file:
Now sign the key:
$ openssl x509 -req -days 365 -in client.csr -CA ca.pem -CAkey ca-key.pem \
-out cert.pem -extfile extfile.cnf
-CAcreateserial -out cert.pem -extfile extfile.cnf
Signature ok
subject=/CN=client
Getting CA Private Key