Hi,
I'm trying to set up an openvpn client on an embedded system.
The embedded system is a Freescale/NXP T1042 CPU running a custom Linux image built with Yocto poky-daisy. OpenVpn 2.1.3, OpenSSL 1.0.1g.
The server is a regular x86 PC running an Ubuntu 12.04.5. Openvpn 2.2.1, OpenSSL 1.0.1 14 Mar 2012.
The problem is the client never creates a tun interface as expected.
The client log shows lots of certificate verification failures which is, i guess, the cause of the malfunction.
But I'm pretty sure that there is nothing wrong with the certificates because:
- Client with the exact same configuration (conf file and certificates, keys...) runs flawlessly when put on an Ubuntu PC.
- Weird thing, when the client runs on the embedded system, the log shows lots of certificate verification failures and some certificate verification successes.
Any clue about what might be wrong?
server.conf=
port 1194
proto udp
dev tun
ca ca.crt
cert myServer.crt
key myServer.key
dh dh2048.pem
server 192.170.1.0 255.255.255.0
push "route 192.170.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
duplicate-cn
keepalive 10 120
tls-auth ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
client.conf=
client
dev tun
remote 10.140.4.2 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca ca.crt
cert myClient.crt
key myClient.key
ns-cert-type server
tls-auth ta.key 1
cipher AES-128-CBC
comp-lzo
extract of client.log (verb=6)=
14:24:14 UDPv4 link remote: 10.140.4.2:1194
...
VERIFY OK: depth=1, /C=../ST=.../L=.../O=.../OU=.../CN=_CA/name=.../emailAddress=...
VERIFY ERROR: depth=0, error=certificate signature failure: /C=../ST=.../L=.../O=.../OU=.../CN=_Server/name=.../emailAddress=...
TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
TLS Error: TLS object -> incoming plaintext read error
TLS Error: TLS handshake failed
TCP/UDP: Closing socket
SIGUSR1[soft,tls-error] received, process restarting
14:24:14 Restart pause, 2 second(s)
...
14:24:16
...
VERIFY OK: depth=1, /C=../ST=.../L=.../O=.../OU=.../CN=_CA/name=.../emailAddress=...
VERIFY OK: nsCertType=SERVER
VERIFY OK: depth=0, error=certificate signature failure: /C=../ST=.../L=.../O=.../OU=.../CN=_Server/name=.../emailAddress=...
UDPv4 WRITE [50] to 10.140.4.2:1194: P_ACK_V1 kid=0 pid=[ #35 ] [ 30 ]
UDPv4 READ [142] from 10.140.4.2:1194: P_CONTROL_V1 kid=0 pid=[ #34 ] [ ] pid=31 DATA len=100
...
TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
TLS Error: TLS handshake failed
TCP/UDP: Closing socket
14:24:16 Restart pause, 2 second(s)