Structure

SecCertificateRef

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

Declaration

iOS, Mac Catalyst, tvOS, watchOS
typedef struct __SecCertificate SecCertificateRef;
macOS
typedef struct __SecCertificate *SecCertificateRef;

Overview

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

See Also

Essentials

Getting a Certificate

Obtain a certificate from an identity, from DER-encoded data, or from the keychain.

Storing a Certificate in the Keychain

Store a certificate in the keychain for safekeeping.

SecCertificateGetTypeID

Returns the unique identifier of the opaque type to which a certificate object belongs.