Function

SecCertificateCopyLongDescription

Returns a copy of the long description of a certificate.

Declaration

CFStringRef SecCertificateCopyLongDescription(CFAllocatorRef alloc, SecCertificateRef certificate, CFErrorRef  _Nullable *error);

Parameters

alloc

The allocator that should be used. Pass NULL or kCFAllocatorDefault to use the default allocator.

certificate

The certificate from which the long description should be copied.

error

A pointer to a CFErrorRef variable where an error object is stored upon failure. If not NULL, the caller is responsible for checking this variable and releasing the resulting object if it exists.

Return Value

A string object containing the long description, or NULL if an error occurred. Free this object with a call to the CFRelease function when you are done with it.

Discussion

The format of this string is not guaranteed to be consistent across different operating systems or versions. Do not attempt to parse it programmatically.

See Also

Certificate Components

Examining a Certificate

Learn how to retrieve properties from a certificate.

SecCertificateCopySubjectSummary

Returns a human-readable summary of a certificate.

SecCertificateCopyCommonName

Retrieves the common name of the subject of a certificate.

SecCertificateCopyEmailAddresses

Retrieves the email addresses for the subject of a certificate.

SecCertificateCopyNormalizedIssuerSequence

Retrieves the normalized issuer sequence from a certificate.

SecCertificateCopyNormalizedSubjectSequence

Retrieves the normalized subject sequence from a certificate.

SecCertificateCopySerialNumberData

Returns the certificate’s serial number.

SecCertificateCopyKey

Retrieves the public key for a given certificate.

SecCertificateCopyShortDescription

Returns a copy of the short description of a certificate.