openvpn: Fix app not installing Debian testing

Closes: #2370.

- In Debian testing (trixie), easy-rsa version is 3.1.5 (up from 3.1.0). In this
version trying to sign a certificate request when the final certificate is
already present leads to an error which fails openvpn app installation.

- In versions 3.1.0 (Debian bookworm/stable) and above, build-server-full also
generates a signing request and then signs the request. So, there is no need to
run them separately.

Tests:

- Uninstall openvpn test that /etc/openvpn directory has been removed. Install
openvpn download client profile and connect using 'sudo openvpn --config
tester.ovpn'. The connection will be successful.

- Files /etc/openvpn/freedombox-keys/pki/issues/{server,tester}.ovpn show
signature values.

- Repeat test for Debian testing and stable/bookworm.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-08-24 07:31:12 -07:00 committed by James Valleroy
parent a81f855731
commit ec89d11494
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -162,10 +162,6 @@ def _create_certificates():
subprocess.check_call([easy_rsa, 'build-ca', 'nopass'], **COMMON_ARGS)
subprocess.check_call([easy_rsa, 'build-server-full', 'server', 'nopass'],
**COMMON_ARGS)
subprocess.check_call([easy_rsa, 'gen-req', 'server', 'nopass'],
**COMMON_ARGS)
subprocess.check_call([easy_rsa, 'sign-req', 'server', 'server'],
**COMMON_ARGS)
@privileged