Certificate
public final class Certificate : TokenObjectClass that describes a certificate object. Inherits from TokenObject.
- 
                  
                  Returns the subject name of the certificate. Note:The string is extracted from the last (most specific) occurrence of common name field. If no such field is defined, the implementation falls back on the first organizational unit name field, or the first organization name field, or the first email address field (in this order). DeclarationSwift public func getSubject() -> StringReturn ValueThe subject name of the certificate. 
- 
                  
                  Returns the issuer name of the certificate. Note:The string is obtained by using the same rules as for Certificate.getSubject().DeclarationSwift public func getIssuer() -> StringReturn ValueThe issuer name of the certificate. 
- 
                  
                  Returns the certificate start of validity date. DeclarationSwift public func getNotBefore() -> StringReturn ValueStart of validity date, given as a ISO-8601 string. 
- 
                  
                  Returns the certificate end of validity date. DeclarationSwift public func getNotAfter() -> StringReturn ValueEnd of validity date, given as a ISO-8601 string. 
- 
                  
                  Fetch the certificate serial number. DeclarationSwift public func getSerial(completionHandler: @escaping (_ serial: String?, _ error: NSError?) -> Void)ParameterscompletionHandlerThe completion handler block to be called as soon as the serial number is retrieved. - serial String?: The serial number of the certificate.
- error NSError:nilif the serial number is retrieved successfully; otherwise an error encapsulates the reason of failure.
 Note The completion handler is executed on the same type ofDispatchQueueas in the calling code.
- serial 
- 
                  
                  Gets the SecCertificateobject, created from currentCertificate.Examplefunc addCertificateToKeychain(certificate: Certificate) { certificate.getSecCertificate { secCertificate, error in if let error = error { print("fail to get SecCertificate " + error.localizedDescription) } else { SecCertificateAddToKeychain(secCertificate, nil) } } }DeclarationSwift public func getSecCertificate(completionHandler: @escaping (_ secCertificate: SecCertificate?, _ error: NSError?) -> Void)ParameterscompletionHandlerThe completion handler block to be called as soon as the SecCertificateis created. It takes the following parameters:- secCertificate SecCertificate?: The createdSecCertificateobject.
- error NSError?:nilif the operation was completed successfully; otherwise an error encapsulates the reason of failure.
 Note The completion handler is executed on the same type ofDispatchQueueas in the calling code.
- secCertificate 
