<!--
{
  "availability" : [
    "iOS: 9.0.0 - 18.0.0",
    "iPadOS: 9.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.11.0 - 15.0.0",
    "tvOS: 17.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NWTCPConnectionAuthenticationDelegate/shouldEvaluateTrust(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(pl)NWTCPConnectionAuthenticationDelegate(im)shouldEvaluateTrustForConnection:"
  },
  "title" : "shouldEvaluateTrust(for:)"
}
-->

# shouldEvaluateTrust(for:)

Indicate that the delegate should override the default trust evaluation for the connection.

```
optional func shouldEvaluateTrust(for connection: NWTCPConnection) -> Bool
```

## Parameters

`connection`

The connection sending this message

## Return Value

Return <doc://com.apple.documentation/documentation/Swift/true> to take over the default trust evaluation, in which case the delegate method `evaluateTrustForConnection:peerCertificateChain:completionHandler`: will be called.

## Discussion

The caller can implement this optional protocol method to decide whether it wants to take over the default trust evaluation for this connection. If this delegate method is not implemented, the return value will default to YES if  `provideIdentityForConnection:completionHandler:` is implemented.

---

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)