I create certificate susing the following:
cd /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0/
source ./vars
#create certificates
./pkitool $usern
When run this correctly creates a certificate:
[root@l]# ./pkitool test
Generating a 1024 bit RSA private key
......++++++
...++++++
writing new private key to 'test.key'
-----
Using configuration from /etc/openvpn/easy-rsa/2.0/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'GB'
stateOrProvinceName :PRINTABLE:'LND'
localityName :PRINTABLE:'LONDON'
organizationName :PRINTABLE:'NAMENAME'
commonName :PRINTABLE:'test'
emailAddress :IA5STRING:'name@name.com'
Certificate is to be certified until Jun 17 17:14:31 2024 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
However, when the client tries to connect they get the error:
Fri Jun 20 09:20:00 2014 OpenVPN 2.3.4 i686-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11]
[IPv6] built on Jun 5 2014
Fri Jun 20 09:20:00 2014 library versions: OpenSSL 1.0.1h 5 Jun 2014, LZO 2.05
Enter Management Password:
Fri Jun 20 09:20:01 2014 Cannot load inline certificate file: error:0906D066:PEM
routines:PEM_read_bio:bad end line: error:140AD009:SSL
routines:SSL_CTX_use_certificate_file:PEM lib
I should I recently migrated openvpn from one server to another.
I copied all files including ca.crt server.crt and server.key plus relevant client keys.
However, something must be missing in the build of the inline file.
Any ideas what to check?