<!--
{
  "documentType" : "article",
  "framework" : "Security",
  "identifier" : "/documentation/Security/policies",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Policies"
}
-->

# Policies

Obtain policies for establishing trust.

## Discussion

For a certificate that is deemed intact and valid (because the chain of signatures is unbroken back to a trusted root certificate), you evaluate it against a set of rules known as a *trust policy*. The policy indicates how particular fields or extensions of a certificate affect whether it should be trusted for a particular use. For example, the policy may state that a certificate must not be expired or must be marked as valid for encryption, code signing, or some other specific purpose.

Usually you use a standard, predefined policy, such as the basic X509 policy or the SSL policy. You can also create custom policies with the certificate, key, and trust services API.

## Topics

### Standard Policies

[`SecPolicyCreateBasicX509()`](/documentation/Security/SecPolicyCreateBasicX509())

Returns a policy object for the default X.509 policy.

[`SecPolicyCreateSSL(_:_:)`](/documentation/Security/SecPolicyCreateSSL(_:_:))

Returns a policy object for evaluating SSL certificate chains.

[`SecPolicyCreateRevocation(_:)`](/documentation/Security/SecPolicyCreateRevocation(_:))

Returns a policy object for checking revocation of certificates.

[Revocation Policy Constants](/documentation/Security/revocation-policy-constants)

Use these flags to create a revocation policy object.

[`SecPolicy`](/documentation/Security/SecPolicy)

An object that represents a trust policy.

[`SecPolicyGetTypeID()`](/documentation/Security/SecPolicyGetTypeID())

Returns the unique identifier of the opaque type to which a policy object belongs.

### Advanced Policy Management

[`SecPolicyCreateWithProperties(_:_:)`](/documentation/Security/SecPolicyCreateWithProperties(_:_:))

Returns a policy object based on an object identifier for the policy type.

[`SecPolicyCopyProperties(_:)`](/documentation/Security/SecPolicyCopyProperties(_:))

Returns a dictionary containing a policy’s properties.

[Security Policy Keys](/documentation/Security/security-policy-keys)

Use these dictionary keys to get and set policy properties.

[Standard Policies for Specific Certificate Types](/documentation/Security/standard-policies-for-specific-certificate-types)

Use special OIDs to cause a certificate to be evaluated based on security policies specific to a given type of certificate.

### Legacy Symbols

[`SecPolicySearch`](/documentation/Security/SecPolicySearch)

An object that contains information about a policy search.

[`SecPolicyCreateWithOID`](/documentation/Security/SecPolicyCreateWithOID)

Returns a policy object for the specified policy type object identifier.

[`SecPolicyGetOID`](/documentation/Security/SecPolicyGetOID)

Retrieves a policy’s object identifier.

[`SecPolicyGetTPHandle`](/documentation/Security/SecPolicyGetTPHandle)

Retrieves the trust policy handle for a policy object.

[`SecPolicyGetValue`](/documentation/Security/SecPolicyGetValue)

Retrieves a policy’s value.

[`SecPolicySearchCopyNext`](/documentation/Security/SecPolicySearchCopyNext)

Retrieves a policy object for the next policy matching specified search criteria.

[`SecPolicySearchCreate`](/documentation/Security/SecPolicySearchCreate)

Creates a search object for finding policies.

[`SecPolicySetProperties`](/documentation/Security/SecPolicySetProperties)

Sets properties for a policy.

[`SecPolicySetValue`](/documentation/Security/SecPolicySetValue)

Sets a policy’s value.

[`SecPolicySearchGetTypeID`](/documentation/Security/SecPolicySearchGetTypeID)

Returns the unique identifier of the opaque type to which a `SecPolicySearch` object belongs.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)