FS#54589 - [openssl] [openvpn]

Attached to Project: Arch Linux
Opened by John (graysky) - Sunday, 25 June 2017, 18:27 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 26 June 2017, 22:41 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I am unable to connect to my openvpn server on a new box (client and server both run Arch x86_64). I believe that OpenVPN is rejecting a self-signed CA signature now whereas it did not in the past. Around November of 2016 when we were on openssl-1.0.2j, I did not experience this issue generating my openvpn files under that version. For example, multiple servers I created then still works to this day using the identical procedure to generate the key/certs[1].

Excerpt from openvpn client trying to connect:
VERIFY ERROR: depth=1, error=self signed certificate in certificate chain: CN=ease CA
OpenSSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
TLS_ERROR: BIO read tls_read_plaintext error
TLS Error: TLS object -> incoming plaintext read error
TLS Error: TLS handshake failed
Fatal TLS error (check_tls_errors_co), restarting
SIGUSR1[soft,tls-error] received, process restarting
Restart pause, 5 second(s)

Are there any Arch modification that might explain breakage of self-signed certs? Again, this all worked (tested multiple times on newly spun up servers in the November/2016 time frame).

Additional info:
openssl 1.1.0.f-1
openvpn 2.4.3-1

Attachments:
server.log - the openvpn server log
client.log - the openvpn client log
myserver.conf - the openvpn conf
myclient.conf - a sanitized (my certs have been removed) client conf to give you the skeleton

Steps to reproduce:
1) Install easy-rsa and openvpn.
2) Follow the Easy-RSA wiki page[1] to create a functional openvpn server (create CA and server certs, sign them etc as documented).
3) Create a client.conf from these files (manually or use ovpngen[2].
4) Run openvpn server on the server and attempt to connect using the client.conf you created.

References:
Discussion thread: https://bbs.archlinux.org/viewtopic.php?id=227632

1. https://wiki.archlinux.org/index.php/Easy-RSA
2. https://github.com/graysky2/ovpngen
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 26 June 2017, 22:41 GMT
Reason for closing:  Not a bug
Comment by John (graysky) - Sunday, 25 June 2017, 18:28 GMT
Sorry, the title got clipped for some reason: OpenVPN client rejection due to self-signed cert error
Comment by Jan de Groot (JGC) - Monday, 26 June 2017, 18:50 GMT
Works fine here. Make sure your client has the server ca.crt configured, without it openvpn will not trust the server certificate.
Comment by John (graysky) - Monday, 26 June 2017, 19:10 GMT
@JGC - Thank you for the verification. To be clear, did you follow the steps on [1] and did you generate your client conf using [2]?

On my server, I have:

# ls /etc/openvpn/server
ca.crt dh.pem server.conf server.crt server.key ta.key

My client profile was generated using [2].
Comment by John (graysky) - Monday, 26 June 2017, 21:33 GMT
I'm sorry to have caused all the problem. As you pointed out, a minor typo in how I generated my client.conf (using server.crt not ca.crt) is to blame. When I executed it correctly, everything works as expected. Please close.

Loading...