---
title: "certificate(for:)"
framework: cryptotokenkit
role: symbol
role_heading: Instance Method
path: "cryptotokenkit/tktoken/configuration-swift.class/certificate(for:)"
---

# certificate(for:)

Returns a certificate from the keychain with the object identifier you specify.

## Declaration

```swift
func certificate(for objectID: TKToken.ObjectID) throws -> TKTokenKeychainCertificate
```

## Parameters

- `objectID`: The identifier for the certificate within the keychain.

## Return Value

Return Value The certificate that the keychain stores.

## Discussion

Discussion If the certificate the objectID specifies isn’t found, the system fills error with TKError.Code.objectNotFound.

## See Also

### Retrieving Keys and Certificates

- [keychainItems](cryptotokenkit/tktoken/configuration-swift.class/keychainitems.md)
- [key(for:)](cryptotokenkit/tktoken/configuration-swift.class/key(for:).md)
