Great post. However, it doesnāt work for me.
I also had guizmo openvpn which worked fine (just a zip on my IOS which contained the ca.crt and configuration.ovpn). I could perfectly connect to my Synology openvpn-server.
I donāt have a p12 file or donāt know where to find it(?!).
I copied the certificate from the ca.crt in my configuration file and imported a .der file (made from ca.crt via openssl command line since Iphone doesnāt import an .crt apparently) on my Iphone.
However, I still get the error that polarssl cannot see/find the certificate. Found also post that mentions to use āwhatever certificateā:
http://askubuntu.com/questions/250324/setting-up-ovpn-connect-for-iphone-with-no-ovpn-file and copied the private key from there (donāt have one). Also
https://forums.openvpn.net/topic12011.html mentions it.
Here are combinations I tried, please advise.
Note: I need protocol to be tcp
client
dev tun
tls-client
remote myremoteserver.com 80
comp-lzo
proto tcp-client
<cert>
-----BEGIN CERTIFICATE-----
MIIDTTCCAragAwIBAg ...
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcA ...
-----END PRIVATE KEY-----
</key>
resolv-retry infinite
client
dev tun
nobind
persist-key
persist-tun
auth-user-pass
#tls-auth ta.key 1
#ca ca.crt
proto tcp-client
pull
comp-lzo
verb 4
<cert>
-----BEGIN CERTIFICATE-----
MIIDTTCCAragAwIBAgIJANIHBUe+5iS2MA0GCSqGSIb3DQEBBQUAMIGnMQswCQYD
VQQGEwJUV...-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALVEXIZYYu1Inmej
uo4Si6Eo5AguTX5sg1pGbLkJSTR4BXQsy6ocUnZ9py8htYkipkUUhjY7zDu+wJlU
tWnVCwCYtewYfEc/+azH7+7eU6ueT2K2IKdik1KhdtNbaNphVvSlgdyKiuZDTCe
dptgWyiL50N7FMcUUMjjXYh/hftBAgMBAAEC...-----END PRIVATE KEY-----
</key>
remote myserver.com 80