The meaning of this enumeration value below is: 1. Afsslpinningmodenone represents the certificate of unconditional Trust server 2. The Afsslpinningmodepublickey representative verifies the PublicKey in the certificate returned by the server, passes through, or does not pass 3. The Afsslpinningmodecertificate delegate verifies the certificate returned by the server with the local certificate, passes through, or does not pass
Common Properties
Common methods
The method used
Afhttprequestoperationmanager *manager = [Afhttprequestoperationmanager manager]; Afsecuritypolicy *securitypolicy = [[Afsecuritypolicy alloc] init]; [SecurityPolicy Setallowinvalidcertificates:no]; [SecurityPolicy setsslpinningmode:afsslpinningmodecertificate]; [SecurityPolicy Setvalidatesdomainname:yes]; [SecurityPolicy Setvalidatescertificatechain:no]; Manager.securitypolicy = securitypolicy;
IOS Development Network Detailed (IX)---afsecuritypolicy analysis