TLS handshake failed,Certificate does not have key usage ext

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
userX
OpenVpn Newbie
Posts: 1
Joined: Thu Mar 12, 2015 11:40 pm

TLS handshake failed,Certificate does not have key usage ext

Post by userX » Thu Mar 12, 2015 11:50 pm

Im trying to use vpn to connect two internal networks using virtual machines.

I have a virtual machine "gateway" and a virtual machine "client", and I want to connect client machine to my gateway machine using vpn.

Im my gateway virtual machine I have network configured as internal network and it has IP `192.168.0.254`

In my client machine I have network configured as internal network and it has `192.168.0.5`

For this purporse I started to install openvpn in my gateway machine and then I create a CA and a certificate in my "gateway" machine:

Code: Select all

   openssl genrsa -des3 -out ca.key 1024
    openssl req -new -key ca.key -out ca.csr
    openssl 509 -req -days 3650 -in ca.csr -out ca.crt -signkey ca.key

    openssl genrsa -out gateway.key 1024
    openssl req -new -key gateway.key -out gateway.csr
    openssl ca -in gateway.csr -cert ca.crt -keyfile ca.key -out gateway.crt
Then I create a certificate to my client machine:

Code: Select all

    openssl genrsa -out client.key 1024
    openssl req -new -key client.key -out client.csr
    openssl ca -in client.csr -cert ca.crt -keyfile ca.key -out client.crt
After this I configured openvpn server.conf file, and when I do service openvpn start I get a grenn "ok message" and if I do ifconfig, `Tun0` was created.

Then I configured the client.conf file and then I started openvpn in my client machine:

service openvpn start

And I get the green "ok message", but if I do `ifconfig` I dont have any `tun0` in my client machine, and when I do `tail -f /var/log/messages` I get errors:
- TLS handshake failed
- Certificate does not have key usage extension

Someone there understand what Im doing wrong? I think its some problem with certificates but Im not finding where..

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: TLS handshake failed,Certificate does not have key usage

Post by maikcat » Fri Mar 13, 2015 6:44 am

did you configured your server to validate EKU?

please post your configs.

Michael.

Post Reply