Skip to content

Commit e524b60

Browse files
problamealorimer
andauthored
docs(transport/tls): improve EasyRSA instructions (#907)
**Problem 1**: Users following the EasyRSA script in the docs with their more recent distro version of EasyRSA find that the generated certs no longer include a subject-alternative-name (SAN), which is required as of Go 1.15 / zrepl 0.3.0. **Problem 2**: Newer openssl versions with the old EasyRSA prompt the user for a CA password in `init-pki` and depending on EasyRSA version there are other interactive prompts at later commands in the script. **Changes**: - upgrade the pinned EasyRSA version to the latest release - use `--auto-san` option to make EasyRSA set the SAN. This has the benefit of also working for IP addresses. I checked the easy-rsa git history and `--subject-alt-name` appears to have been present in all 3.X releases, so, adding the flag shouldn't break users of older EasyRSA 3.X. (And these are exemplary instructions anyway.) refs - fixes #900 - obsoletes #906 - obsoletes #877 Co-authored-by: Andrew Lorimer <[email protected]>
1 parent 27f4ad1 commit e524b60

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/configuration/transports.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ The connection fails if either do not match.
165165
Mutual-TLS between Two Machines
166166
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167167

168-
However, for a two-machine setup, self-signed certificates distributed using an out-of-band mechanism will also work just fine:
168+
For a two-machine setup, self-signed certificates distributed using an out-of-band mechanism will also work just fine:
169169

170170
Suppose you have a push-mode setup, with `backups.example.com` running the :ref:`sink job <job-sink>`, and `prod.example.com` running the :ref:`push job <job-push>`.
171171
Run the following OpenSSL commands on each host, substituting HOSTNAME in both filenames and the interactive input prompt by OpenSSL:
@@ -218,19 +218,19 @@ Tools like `EasyRSA <https://github.com/OpenVPN/easy-rsa>`_ make this very easy:
218218
#!/usr/bin/env bash
219219
set -euo pipefail
220220

221-
HOSTS=(backupserver prod1 prod2 prod3)
221+
HOSTS=(backupserver prod1 prod2 prod3 10.23.42.1)
222222

223-
curl -L https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.7/EasyRSA-3.0.7.tgz > EasyRSA-3.0.7.tgz
224-
echo "157d2e8c115c3ad070c1b2641a4c9191e06a32a8e50971847a718251eeb510a8 EasyRSA-3.0.7.tgz" | sha256sum -c
225-
rm -rf EasyRSA-3.0.7
226-
tar -xf EasyRSA-3.0.7.tgz
227-
cd EasyRSA-3.0.7
228-
./easyrsa
229-
./easyrsa init-pki
230-
./easyrsa build-ca nopass
223+
curl -L https://github.com/OpenVPN/easy-rsa/releases/download/v3.2.5/EasyRSA-3.2.5.tgz > EasyRSA-3.2.5.tgz
224+
echo "662ee3b453155aeb1dff7096ec052cd83176c460cfa82ac130ef8568ec4df490 EasyRSA-3.2.5.tgz" | sha256sum -c
225+
rm -rf EasyRSA-3.2.5
226+
tar -xf EasyRSA-3.2.5.tgz
227+
cd EasyRSA-3.2.5
228+
./easyrsa --batch
229+
./easyrsa --batch init-pki
230+
./easyrsa --batch build-ca nopass
231231

232232
for host in "${HOSTS[@]}"; do
233-
./easyrsa build-serverClient-full $host nopass
233+
./easyrsa --batch --auto-san build-serverClient-full $host nopass
234234
echo cert for host $host available at pki/issued/$host.crt
235235
echo key for host $host available at pki/private/$host.key
236236
done

0 commit comments

Comments
 (0)