after adding the OVPN configuration file and the p12 key in the iPhone, we will receive an error and the connection is not successfull. In order to solve this we need to add in the ovpn configuration file between <ca> </ca> the root certificate of the OpenVPN server.
For example:
#OpenVPN Server conf tls-client client dev tun proto tcp tun-mtu 1400 nobind remote server.example.com 1194 pkcs12 iphone.p12 cipher BF-CBC verb 3 ns-cert-type server <ca> -----BEGIN CERTIFICATE----- MIIEwTCCA6mgAwIBAgIJAO8FEXJYWXYIMA0GCSqGSIb3DQEBCwUAMIGbMQswCQYD VQQGEwJFUzERMA8GA1UECBMIQXN0dXJpYXMxDzANBgNVBAcTBk92aWVkbzEQMA4G A1UEChMHQW5hc29mdDEUMBIGA1UECxMLQ29uc3VsdGFuY3kxEzARBgNVBAMTCkFu YXNvZnQgQ0ExKzApBgkqhkiG9w0BCQEWHGNhcmxvcy52aWxsYWJyaWxsZUBnbWFp bC5jb20wHhcNMTcwMzE2MDAyNzM1WhcNMzIwMzE2MDAyNzM1WjCBmzELMAkGA1UE BhMCRVMxETAPBgNVBAgTCEFzdHVyaWFzMQ8wDQYDVQQHEwZPdmllZG8xEDAOBgNV BAoTB0FuYXNvZnQxFDASBgNVBAsTC0NvbnN1bHRhbmN5MRMwEQYDVQQDEwpBbmFz b2Z0IENBMSslMWYJKoZIhvcNAQkBFhxjYXJsb3MudmlsbGFicmlsbGVAZ21haWwu Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyVvqx1xmyvV08vzc Cq831edSHLsrNPOopdCRZiB9uSNFsnS/V9XfBqopFfKV6HenyQzp9WRFuB/oVsK9 OomacMRtJXQj7sDWxsqALAfZTdNtVWRU8ilMuo9NiY+8mOko0HURcCH5N7JIMRnB bxaRpO/kya9/LqxA4Bzn9Tjvedy8fThXy40EjlozjelF5yyyqKenRDYuEypxfErb rirZwFCs/GaWG4IabjnTsiSTZU15eMloxZAlou5MvK2HqpyywxEK4H5Yj27nuZog y8DvgeWWVSDEAPOoglAk3KpLlKNo8sc4KubN+xMx5B7pONwDt23aFHVqfbSMpE2W rF6bEwIDAQABo4IBBDCCAQAwHQYDVR0OBBYEFAFoflQibhMPtIYiCrni9UUUGCub MIHQBgNVHSMEgcgwgcWAFAFoflQibhMPtIYiCrni9UUUGCuboYGhpIGeMIGbMQsw CQYDVQQGEwJFUzERMA8GA1UECBMIQXN0dXJpYXMxDzANBgNVBAcTBk92aWVkbzEQ MA4GA1UEChMHQW5hc29mdDEUMBIGA1UECxMLQ29uc3VsdGFuY3kxEzARBgNVBAMT CkFuYXNvZnQgQ0ExKzApBgkqhkiG9w0BCQEWHGNhcmxvcy52aWxsYWJyaWxsZUBn bWFpbC5jb22CCQDvBRFyWFl2CDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUA A4IBAQC4iGfFoxs9tx4OsY+Jrseb2UY7bBWnTJWTBQgGyQ7U0ei71KbuZyCEFqoa 94Jo2w6lbg0JOw6kPcju/OzdDZuLnaoIBr6PrQ9fCVPohpCbKbOrwbXn68HyqYGv TS4JChkFjoHXUSFmrXIs7DUbzc5yCskZLGJpl3DNCmPErfQKOzLlHTokO0lDCtOO tqbELP0H02s0N3+88NFP0ei7XH0teo6QkzFwmq/Zo1eGxZjLrfwMazCz9xeBE1W+ sQJK3y9pjsPlIuRfXIjqRKPb7SCbEsSnWeRN5jqndvgIXykRZcKfYjUDFQ+8X7b IKc7mPeCYz0IkPhecWm1qwC1NFa0 -----END CERTIFICATE----- </ca>
Then import the new ovpn configuration file and the connection will be successful.