| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/SecurityInterface.framework |
| Availability | Available in Mac OS X v10.3 and later
|
| Companion guide | |
| Declared in | SFCertificateView.h |
The SFCertificateView class displays the contents of a certificate. It includes options to display certificate details, display trust settings, and allow users to edit a certificate’s trust settings.
The following figure shows a certificate view that includes editable trust settings and certificate details.
Returns the certificate currently displayed in the view.
- (SecCertificateRef)certificate
SFCertificateView.hIndicates if the view currently shows the certificate’s details.
- (BOOL)detailsDisplayed
SFCertificateView.hIndicates if the view allows the user to edit the certificate’s trust.
- (BOOL)isEditable
SFCertificateView.hIndicates if the view currently shows the certificate’s trust settings.
- (BOOL)isTrustDisplayed
SFCertificateView.hReturns an array of policies used to evaluate the status of the displayed certificate.
- (NSArray *)policies
This method returns an autoreleased NSArray containing one or more instances of SecPolicyRef. The array always contains at least one item (the Apple X.509 Basic policy, if you have never called the setPolicies: method).
SFCertificateView.hSaves the user’s current trust settings for the displayed certificate.
- (void)saveTrustSettings
If trust settings are not editable, this method effectively does nothing. You can use SecTrustGetUserTrust to subsequently retrieve the trust settings.
SFCertificateView.hSpecifies the certificate that’s displayed in the view.
- (void)setCertificate:(SecCertificateRef)certificate
The new certificate for the view.
SFCertificateView.hSpecifies whether the user can see the certificate details.
- (void)setDisplayDetails:(BOOL)display
Pass YES to display the certificate details, or NO to hide them.
For behavioral compatibility with Mac OS X v10.3, certificate details are displayed by default. To hide the details of a certificate, you must explicitly set the display value to NO.
SFCertificateView.hSpecifies whether the user can see the certificate’s trust settings.
- (void)setDisplayTrust:(BOOL)display
Pass YES to display the trust settings, or NO to hide them.
Certificate trust settings are not displayed by default. To show the certificate’s trust settings, you must explicitly set the display value to YES. with either this method or the setEditableTrust method.
SFCertificateView.hSpecifies whether the user can edit the certificate’s trust settings.
- (void)setEditableTrust:(BOOL)editable
Pass YES if the trust settings should be editable.
For behavioral compatibility with Mac OS X v10.3, this method causes the certificate trust settings to be displayed if they are not currently visible (that is, if setDisplayTrust: is set to NO).
SFCertificateView.hSpecifies the policies to use when evaluating this certificate’s status.
- (void)setPolicies:(id)policies
The policy or policies to use. You can pass either a SecPolicyRef object or an NSArray (containing one or more objects of type SecPolicyRef ) in this parameter. If policies is set to nil, the Apple X.509 Basic Policy is used. See “AppleX509TP Trust Policies” for a list of policies and object identifiers provided by the AppleX509TP module.
Applications typically display a certificate view in the context of a specific use, such as SSL or S/MIME. You should set only the policy references that apply to your intended use.
SFCertificateView.h
Last updated: 2006-05-23