runModal(for:message:)
Displays a modal panel that shows the results of a certificate trust evaluation and that allows the user to edit trust settings.
Declaration
func runModal(for trust: SecTrust!, message: String!) -> IntParameters
- trust:
A trust management object. Use the Sectrustcreatewithcertificates(_:_:_:) function (in Security/SecTrust.h) to create the trust management object.
- message:
A message string to display in the panel.
Discussion
This method returns NSOKButton if the default button is clicked, or NSCancelButton if the alternate button is clicked.
The user can use this panel to edit trust decisions for the specified certificate or for any of the certificates in the certificate chain. The trust settings are saved when the user clicks the default button. Call SecTrustGetUserTrust to obtain the user’s trust settings.
Note that changing the user trust settings does not affect the results of a trust evaluation. Therefore, the trust evaluation shown in the panel (such as “This certificate is not yet valid”) does not change, nor does the result of a call to SecTrustGetResult. It is up to your application to determine how to handle the user’s trust decision.