---
title: "shouldEvaluateTrust(for:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/nwtcpconnectionauthenticationdelegate/shouldevaluatetrust(for:)"
---

# shouldEvaluateTrust(for:)

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

## Declaration

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

## Parameters

- `connection`: The connection sending this message

## Return Value

Return Value Return true to take over the default trust evaluation, in which case the delegate method evaluateTrustForConnection:peerCertificateChain:completionHandler: will be called.

## Discussion

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.

## See Also

### Delegate methods

- [evaluateTrust(for:peerCertificateChain:completionHandler:)](networkextension/nwtcpconnectionauthenticationdelegate/evaluatetrust(for:peercertificatechain:completionhandler:).md)
- [shouldProvideIdentity(for:)](networkextension/nwtcpconnectionauthenticationdelegate/shouldprovideidentity(for:).md)
- [provideIdentity(for:completionHandler:)](networkextension/nwtcpconnectionauthenticationdelegate/provideidentity(for:completionhandler:).md)
