SNI Support in AFNetworking

I have a root certificate that is used to sign with different subdomain names on the server, which basically implements the SNI in the backend. Now how can I use this certificate and subdomain name to validate the request.

+4
source share
1 answer

SNI is supported out of the box. And in my experience it works (two second-level domains on the same IP address)

I see 3 reasons if this does not work for you:

  • Your server is not configured properly. You can check if the server returns the expected certificate with Safari.
  • Your certificate is self-signed. In this case, you should check AFSecurityPolicy for pinned certificates, there is nothing special about SNI.
  • . AFSecurityPolicy.
+2

All Articles