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.