I have successfully set up an openvpn server (Debian) and client (Gentoo). The client keys I generated with passphrase. When starting the openvpn service on the client, I can enter the common name and passphrase, and the service starts. I can then connect to the server via the vpn network. So far so good.
Next I set this directive in the client openvpn.conf:
auth-user-pass /etc/openvpn/keys/client.passwd
That file exists and contains two lines with common name and passphrase. When I now restart the service, I get this messages in the log file:
Mon Jan 30 16:51:10 2012 us=653898 auth_user_pass_file = '/etc/openvpn/keys/client.passwd'
Mon Jan 30 16:51:10 2012 us=653921 OpenVPN 2.1.4 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [MH] [PF_INET6] built on Jan 30 2012
Mon Jan 30 16:51:10 2012 us=654065 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Jan 30 16:51:10 2012 us=654110 PO_INIT maxevents=4 flags=0x00000002
Enter Private Key Password:
Mon Jan 30 16:51:24 2012 us=827454 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Jan 30 16:51:24 2012 us=827663 Cannot load private key file /etc/openvpn/keys/client.key: error:0906A068:PEM routines:PEM_do_header:bad password read: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
Mon Jan 30 16:51:24 2012 us=827781 Error: private key password verification failed
Mon Jan 30 16:51:24 2012 us=827804 Exiting
What did I do wrong? :?