I was following this wiki instruction to generate OpenVPN client certificate. This involves:
easyrsa gen-req client1 nopass
I tried to use this client1 certificate in my OpenVPN setup. The server log show the following logs (note: the IP address changed from public IP to 192.168.0.2
for security reason):
192.168.0.2:5570 TLS: Initial packet from [AF_INET]192.168.0.2:5570, sid=1e71335b cc13ec8f
192.168.0.2:5570 VERIFY ERROR: depth=0, error=unsupported certificate purpose: CN=client1
192.168.0.2:5570 OpenSSL: error:1417C086:SSL routines:tls_process_client_certificate:certificate verify failed
192.168.0.2:5570 TLS_ERROR: BIO read tls_read_plaintext error
192.168.0.2:5570 TLS Error: TLS object -> incoming plaintext read error
192.168.0.2:5570 TLS Error: TLS handshake failed
192.168.0.2:5570 SIGUSR1[soft,tls-error] received, client-instance restarting
So the clear error should be this:
VERIFY ERROR: depth=0, error=unsupported certificate purpose: CN=client1
I checked the certificate with this command:
openssl x509 -in client1.crt -text -noout -purpose
And the Certificate purposes section output looks like this:
Certificate purposes:
SSL client : No
SSL client CA : No
SSL server : Yes
SSL server CA : No
Netscape SSL server : Yes
Netscape SSL server CA : No
S/MIME signing : No
S/MIME signing CA : No
S/MIME encryption : No
S/MIME encryption CA : No
CRL signing : No
CRL signing CA : No
Any Purpose : Yes
Any Purpose CA : Yes
OCSP helper : Yes
OCSP helper CA : No
Time Stamp signing : No
Time Stamp signing CA : No
My Questions:
- What is wrong with my client certificate?
- What should I do to generate the correct certificate?