Sets the policies to use in an evaluation.
- iOS 6.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The trust management object whose policy list you wish to set.
An array of one or more
Secobjects for the policies to be used by this trust management object. A single policy object of type
Secmay also be passed, representing an array of one policy.
A result code. See Security Framework Result Codes.
The policies you set with this function replace any already in the trust management object.
It is safe to call this function concurrently on two or more threads as long as it is not used to change the value of a trust management object that is simultaneously being used by another function. For example, you cannot call this function on one thread at the same time as you are calling the
Sec function for the same trust management object on another thread, but you can call this function and simultaneously evaluate a different trust management object on another thread. Similarly, calls to functions that return information about a trust management object (such as the
Sec function) may fail or return an unexpected result if this function is simultaneously changing the same trust management object on another thread.