In order to validate a domain name for self signed certificates, you MUST use pinning

解决办法:

since you have manager initialized, you can do:

manager.securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy.validatesDomainName = NO;

and it will work for a self-signed certificate

链接地址:

http://stackoverflow.com/questions/27808249/problems-with-ssl-pinning-and-afnetworking-2-5-0-nsurlerrordomain-error-1012

你可能感兴趣的:(In order to validate a domain name for self signed certificates, you MUST use pinning)