<!--
{
  "availability" : [
    "macOS: 10.2.0 - 10.7.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecTrustGetResult",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecTrustGetResult"
  },
  "title" : "SecTrustGetResult"
}
-->

# SecTrustGetResult

Retrieves details on the outcome of a call to the function `SecTrustEvaluate`.

```
OSStatus SecTrustGetResult(SecTrustRef trustRef, SecTrustResultType *result, CFArrayRef*certChain, CSSM_TP_APPLE_EVIDENCE_INFO **statusChain);
```

## Parameters

`trustRef`

A trust management object that has previously been sent to the [`SecTrustEvaluate(_:_:)`](/documentation/Security/SecTrustEvaluate(_:_:)) function for evaluation.

`result`

A pointer to the result type returned in the `result` parameter by the `SecTrustEvaluate` function.

`certChain`

On return, points to an array of certificates that constitute the certificate chain used to verify the input certificate. In Objective-C, call the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function to release this object when you are finished with it.

`statusChain`

On return, points to an array of `CSSM_TP_APPLE_EVIDENCE_INFO` structures, one for each certificate in the certificate chain. The first item in the array corresponds to the leaf certificate, and the last item corresponds to the anchor (assuming that verification of the chain did not fail before reaching the anchor certificate). Each structure describes the status of one certificate in the chain. This structure is defined in `cssmapple.h`. Do not attempt to free this pointer; it remains valid until the trust management object is released or until the next call to the function `SecTrustEvaluate` that uses this trust management object.

## Return Value

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes).

## Discussion

After calling the [`SecTrustEvaluate(_:_:)`](/documentation/Security/SecTrustEvaluate(_:_:)) function, you can call the [`SecTrustGetResult`](/documentation/Security/SecTrustGetResult) function or the [`SecTrustGetCssmResult`](/documentation/Security/SecTrustGetCssmResult) function to get detailed information about the results of the evaluation. Whereas the `SecTrustGetResult` function returns the information in a form that you can interpret without extensive knowledge of CSSM, the [`SecTrustGetCssmResult`](/documentation/Security/SecTrustGetCssmResult) function returns information in a form that can be passed directly to CSSM functions.

You can call the `SFCertificateTrustPanel` class in the <doc://com.apple.documentation/documentation/SecurityInterface> to display these results to the user.

It is safe to call this function concurrently on two or more threads as long as it is not used to get values from a trust management object that is simultaneously being changed by another function. For example, you can call this function on two threads at the same time, but not if you are simultaneously calling the [`SecTrustSetVerifyDate(_:_:)`](/documentation/Security/SecTrustSetVerifyDate(_:_:)) function for the same trust management object on another thread.

### Special Considerations

Use [`SecTrustGetTrustResult(_:_:)`](/documentation/Security/SecTrustGetTrustResult(_:_:)) for new development instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)