---
title: SecCertificate
framework: security
role: symbol
role_heading: Class
path: security/seccertificate
---

# SecCertificate

An abstract Core Foundation-type object representing an X.509 certificate.

## Declaration

```swift
class SecCertificate
```

## Mentioned in

Getting a Certificate Storing a DER-Encoded X.509 Certificate Storing an Identity in the Keychain

## Overview

Overview A SecCertificate object for a certificate that is stored in a keychain can be safely cast to a SecKeychainItem for manipulation as a keychain item. On the other hand, if the SecCertificate is not stored in a keychain, casting the object to a SecKeychainItem and passing it to Keychain Services functions returns errors.

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
