How to generate iOS certificate for public key pinning(SSL pinning)

765 Views Asked by At

I'm suppose to use SSL pinning(public key pinning) in my app. I'm new to this. Can somebody reply me with brief step of generating public key, csr file and SSL certificate for iOS.

1

There are 1 best solutions below

2
On

Public key pinning means that you check the public key of a TLS certificate, when trying to initiate secure communications. I see two ways you can do this:

1) Generate a self-signed certificate, using the OpenSSL tool. Install it on your back-end and enforce TLS. You have to add this certificate to the trusted list on the iOS device, or it will not work.

2) Use a real Let's Encrypt free TLS certificate: https://letsencrypt.org/

To be able to give a correct and exact answer, I need to know if it is for personal or public use and if you have full control over back-end or not.