Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1363844 - openvpn@.service ignores Environment setting in drop-in file
Summary: openvpn@.service ignores Environment setting in drop-in file
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: David Sommerseth
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-03 17:33 UTC by styxd6
Modified: 2017-08-08 16:12 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-08-08 16:12:17 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1362244 None None None Never

Internal Links: 1362244

Description styxd6 2016-08-03 17:33:14 UTC
Description of problem:
I need to connect to a VPN network which, unfortunately, is still using MD5-signed certificate. In Fedora 23, I have crated a drop-in file md5.conf:

$ systemctl status openvpn@xxxx.serviceopenvpn@xxxx.service - OpenVPN Robust And Highly Flexible Tunneling Application On xxxx
   Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/openvpn@xxxx.service.d
   Active: inactive (dead)

The drop-in sets the environment for the service:


In Fedora 23, this setup was working fine. In Fedora 24, this fails as if MD5 verification was not enabled.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure openvpn to connect to a network using a certificate with MD5 signature.
2. Enable MD5 support in OpenSSL via [Service]/Environment setting.
3. Start the service and observe its logs.

Actual results:
openvpn refuses to connect as when OPENSSL_ENABLE_MD5_VERIFY=1 is not set.

Expected results:
openvpn should connect to the VPN network.

Additional info:
When running openvpn as:

$ env OPENSSL_ENABLE_MD5_VERIFY=1 openvpn /etc/openvpn/xxxx.conf

the connection is established without any issue. This problem must be either in the service file provided with openvpn in Fedora 24, or has something to do with systemd.

Comment 1 David Sommerseth 2016-08-03 18:03:47 UTC

This issue is not related to OpenVPN at all.  OpenVPN depends completely on the SSL library to take care of the SSL/TLS layer, which includes the certificate validation.  So when OpenVPN doesn't accept a certificate, it is due to OpenSSL not accepting it.  And when you set the OPENSSL_ENABLE_MD5_VERIFY env. variable, it is the OpenSSL library picking up that value and not anything OpenVPN understands at all.

I see three possible solutions:

a) Get a new SHA based certificate as a replacement for the MD5 (the recommended 

b) Build your own OpenSSL (or mbedTLS/PolarSSL) library and rebuild OpenVPN from 
   scratch with the proper settings to allow MD5

c) Re-open this bz and re-file it to the OpenSSL people and see if they can do 
   something (most likely not)

Comment 2 styxd6 2016-08-03 18:47:10 UTC

Please, consider that when invoked from command line, openvpn does catch the environment variable correctly, as I've noted.

The problem seems not with the openvpn program, but rather with openvpn@.service unit file - which is provided by the openvpn package, which is why I filed the bug against openvpn. Either that, or it's a problem in systemd.

Since this was dismissed, I'll re-file the bug to systemd. OpenSSL doesn't seem to be related to the problem, since by the time the library is called the environment variable has already failed to be exported by the systemd service.

Comment 3 Zbigniew Jędrzejewski-Szmek 2016-08-04 05:25:05 UTC
Hm, it seems to work fine here (in the sense that the environment variable is set in the service process properly). Which version of systemd are you using exactly? 

There's been a similar report about Environment not being propagated correctly, but I cannot reproduce the error, so either it's some subtle error in the configuration, or I'm missing some step to properly reproduce this. Maybe somebody who sees this will be able to debug.

Comment 4 styxd6 2016-08-09 18:21:46 UTC

This is the output of systemctl --version

systemd 229

I'm using the current Fedora 24 version.

Comment 5 Fedora End Of Life 2017-07-25 22:14:16 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2017-08-08 16:12:17 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.