---
title: "SecTrustSetOptions(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sectrustsetoptions(_:_:)"
---

# SecTrustSetOptions(_:_:)

Sets option flags for customizing evaluation of a trust object.

## Declaration

```swift
func SecTrustSetOptions(_ trustRef: SecTrust, _ options: SecTrustOptionFlags) -> OSStatus
```

## Parameters

- `trustRef`: The trust object to modify.
- `options`: The new set of option flags. For a list of options, see doc://com.apple.security/documentation/Security/SecTrustOptionFlags.

## Return Value

Return Value A result code. See Security Framework Result Codes.
