How to Install and Trust Intermediate & Root CA Certificates on iPhone
When developing, you may want to build your own Certificate Authority (CA) with a public key certificate, issue a self-signed server certificate, and test HTTPS communication.
This page explains how to install your custom CA's intermediate and root certificates on an iPhone and configure the device to trust them.
We'll assume that you already have the intermediate CA certificate and root CA certificate as .pem files. Send these files to your iPhone via email or another method and save them on the device.
Install the Intermediate CA Certificate on iPhone
Let's start by installing the intermediate CA certificate on your iPhone.
Tap the intermediate CA certificate .pem file saved on your iPhone.
If prompted to select a device, choose iPhone.
A message saying “Profile Downloaded” will appear. Tap Close.
Open the Settings app, and you'll see “Profile Downloaded.” Tap it.
The profile for the intermediate CA certificate will be displayed. Tap Install.
Enter your device passcode.
A warning will appear. Tap Install.
Tap Install again.
Once the installation is complete, tap Done.
The intermediate CA certificate is now installed.
Install the Root CA Certificate on iPhone
Next, let's install the root CA certificate on your iPhone. The process is the same as installing the intermediate CA certificate.
Tap the root CA certificate pem file saved on your iPhone.
If prompted to select a device, choose iPhone.
A message saying “Profile Downloaded” will appear. Tap Close.
Open the Settings app, and you'll see “Profile Downloaded.” Tap it.
The profile for the root CA certificate will be displayed. Tap Install.
Enter your device passcode.
A warning will appear. Tap Install.
Tap Install again.
Once the installation is complete, tap Done.
The root CA certificate is now installed.
Trust the Root CA Certificate on iPhone
Now, let's configure your iPhone to trust the installed root CA certificate.
Open the Settings app and select General.
In the General menu, tap About.
Scroll to the bottom and tap Certificate Trust Settings.
Under “Enable Full Trust for Root Certificates,” you'll see the root certificate you just installed. Toggle it on.
A warning will appear. Tap Continue.
Your iPhone is now configured to trust the installed root certificate.
That's it. You've now installed and trusted both the intermediate and root CA certificates on your iPhone.