Ensure full certificate chain is verified to prevent false positives from compromised certificate chains and ensure developer includes full cert chain. Ensure trust is validated before evaluating certificate. Security policy tests pass with changes. Prior to changes, tests for setSSLPinningMode:AFSSLPinningModePublicKey and setSSLPinningMode:AFSSLPinningModeCertificate would pass when one or more certificates weren't bundled.

We know from SecTrustEvaluate that the certificate presented by the server is valid. Thus, it wouldn’t make sense to return true if only one certificate in the chain validates, because, SSL pinning is to ensure the previously-issued certificate chain matches the server trust. While the prior implementation protects against MITM certs from sources such as corporate firewalls, this measure is to combat wider-spread compromises of certificate authorities.