---
title: kSecMatchTrustedOnly
framework: security
role: symbol
role_heading: Global Variable
path: security/ksecmatchtrustedonly
---

# kSecMatchTrustedOnly

A key whose value is a Boolean indicating whether untrusted certificates should be returned.

## Declaration

```swift
let kSecMatchTrustedOnly: CFString
```

## Discussion

Discussion The corresponding value is of type CFBoolean. If this attribute is provided with a value of kCFBooleanTrue, only certificates that can be verified back to a trusted anchor are returned. If this value is kCFBooleanFalse or the attribute is not provided, then both trusted and untrusted certificates may be returned.
