Limit my iPhone application to use only one server certificate

My application uses ASIHttpRequest for my communication with the server. I have a requirement that I block the HTTP protocol because I do not want to transmit this data via an insecure link. Thus, only SSL is allowed through HTTPS. Also even thought the link was https. I need to make sure I'm calling the correct certificate. Therefore, I need a server certificate certificate in my code. Please help me how to do this.

I researched this. I have found some possible answers. One of them is to create a client certificate and perform verification. There are also ways to support "Client Certificates" in the ASIHttpRequest documentation. So how to achieve my requirements above. The integration of CFNetwork code into ASIHttpRequest will also be implemented.

Hi,

Dilshan

+3
source share
1 answer

You can get a verified certificate from a certification authority such as StartSSL or Thawte. Then, iOS checks to see if the trusted authority is trusted. iOS comes with various trusted authors.

If the server certificate is not verified by authority, the connection is rejected.

You do not need to do anything special in code. Use only https connection.

+2
source

Source: https://habr.com/ru/post/1788115/


All Articles