VPN Certificate

Hello,

I'm trying to make VPN connection via certifacate. So, i had downloaded certificate in "crt" format. How i can connect programatically to our IKEv2 server with certificate?

I found solution how to install certificate here http://stackoverflow.com/questions/12798950/ios-install-ssl-certificate-programaticallybut looks like vpn not working. I can't connect.

I can install certificate manualy and i can connect but programatically not. Can someone explain how to do?


Here is some code for connection

https://pastebin.com/X7CuHsbj

Thanks

Is the goal for you to have the client provide the certificate to the server so that the server can authenticate the client? If so, you need to get the data into PKCS#12 format and then apply it to your configuration via the

identityData
and
identityDataPassword
properties of the NEVPNProtocolIPSec.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi @Eskimo,


I am doing following steps to create vpn connection:


1. Converting .cert into .p12 using openssl command with password.

2. Added it in app bundle.

3. Fetching .p12 from bundle and converting it into the data, and then setting identityData of IKEv2 protocol.

4. Setting password to that .p12


But stil I am not able to connect to my vpn server. But If I manually install .cert in iPhone and add VPN Configuration from settings, I am able to connect to my vpn server. Can you please help me to identify the issue.



Thanks

fs272

VPN Certificate
 
 
Q