Does SecTrustEvaluate() look for root certificates in the application keychain?

后端 未结 3 2231
逝去的感伤
逝去的感伤 2021-01-03 13:45

The docs say: “If not all the certificates needed to verify the leaf certificate are included in the trust management object, then SecTrustEvaluate searches for certificates

3条回答
  •  臣服心动
    2021-01-03 14:01

    eskimo1 from Apple Devforums answered this so:

    1. Does SecTrustEvaluate() look for root certificates in the application keychain?

    Not by default. However, it's easy to make it do this by getting the certificates out of your keychain (or from wherever) and applying them to the SecTrust object using SecTrustSetAnchorCertificates.

    SecTrustEvaluation /will/ find intermediate certificates in your keychain.

提交回复
热议问题