ios - AFNetworking SSL Request -


i user af send https request

    [self.manager post:downloadurlstirng parameters:parameters success:^(afhttprequestoperation *operation, id responseobject) {         if (success)             success(responseobject,passparameters);     } failure:^(afhttprequestoperation *operation, nserror *error) {         if(failure)             failure(operation.responseobject,error,passparameters);     }]; 

and have set securitypolicy yes

    self.manager.requestserializer = [afjsonrequestserializer serializer]; self.manager.securitypolicy.allowinvalidcertificates = openssl; 

but still got code -1012 , error_message : in order validate domain name self signed certificates, must use pinning.

this sets security policy allow invalid certificates , stops domain name validation also.:

afsecuritypolicy *securitypolicy = [afsecuritypolicy  policywithpinningmode:afsslpinningmodenone]; securitypolicy.allowinvalidcertificates = yes;  [securitypolicy setvalidatesdomainname:no]; 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -