| | |
| | | |
| | | /** |
| | | The certificates used to evaluate server trust according to the SSL pinning mode. |
| | | |
| | | By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`. |
| | | |
| | | Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches. |
| | | |
| | | @see policyWithPinningMode:withPinnedCertificates: |
| | | */ |
| | | @property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates; |
| | | |
| | |
| | | |
| | | /** |
| | | Creates and returns a security policy with the specified pinning mode. |
| | | |
| | | Certificates with the `.cer` extension found in the main bundle will be pinned. If you want more control over which certificates are pinned, please use `policyWithPinningMode:withPinnedCertificates:` instead. |
| | | |
| | | @param pinningMode The SSL pinning mode. |
| | | |
| | | @return A new security policy. |
| | | |
| | | @see -policyWithPinningMode:withPinnedCertificates: |
| | | */ |
| | | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; |
| | | |
| | |
| | | @param pinnedCertificates The certificates to pin against. |
| | | |
| | | @return A new security policy. |
| | | */ |
| | | |
| | | @see +certificatesInBundle: |
| | | @see -pinnedCertificates |
| | | */ |
| | | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates; |
| | | |
| | | ///------------------------------ |