SecCertificateCopySerialNumberData(_:_:)
Returns the certificate’s serial number.
Declaration
func SecCertificateCopySerialNumberData(_ certificate: SecCertificate, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> CFData?Parameters
- certificate:
The certificate from which to copy the serial number.
- error:
A Cferror pointer the function uses to return an error instance on failure. Set to
nilto ignore any error.
Return Value
The content of a DER-encoded integer (without the tag and length fields) for this certificate’s serial number.
Discussion
In Objective-C, if the function returns an error free it with a call to CFRelease when you are done with it. If it returns data, you must free that as well.