EVENT: CORE_ERROR PolarSSL: error parsing config private key : PK - Bad input parameters to function [ERR]
I get this error when I connect my own VPN server using iOS openVPN (OpenVPN 1.1.1 build 212 iOS 64-bit).
The VPN server I built is on Raspberry Pi using PiVPN, which I can connect using computer version OpenVPN without problems. I copied the same config file I used on the computer to iPhone. I got the error shown above. The server using a 4096-bit key, is this the problem?
Anyone know how can I fix it? Thanks in advance.
Wont connect using openVPN
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 4
- Joined: Sun Aug 20, 2017 2:50 pm
Re: Wont connect using openVPN
Thanks for the reply, but I don't think this is my case, I can sync with iTunes, and my key ca etc. are in one file.
-
- OpenVpn Newbie
- Posts: 4
- Joined: Sun Aug 20, 2017 2:50 pm
Re: Wont connect using openVPN
I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.
Code: Select all
client
dev tun
proto udp
remote server.name 1194
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1
remote-cert-tls server
tls-version-min 1.2
verify-x509-name server name
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 1
<ca>
-----BEGIN CERTIFICATE-----
..............................................
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
..............................................
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
-----END ENCRYPTED PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Wont connect using openVPN
That is only the --tls-auth key not your private key.dearyuxiao wrote:I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>
-
- OpenVpn Newbie
- Posts: 4
- Joined: Sun Aug 20, 2017 2:50 pm
Re: Wont connect using openVPN
Ok, thanks for explaining. but still, I won't be able to connect to the VPN server. I can use the same config file to connect using a windows 10 computer. I don't know what the problem is.TinCanTech wrote:That is only the --tls-auth key not your private key.dearyuxiao wrote:I thought I used 4096 bit key but after checking the config file, it looks like I am actually using a 2048 key.
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
..............................................
-----END OpenVPN Static key V1-----
</tls-auth>