Contents

SecPolicyCreateSSL(_:_:)

Returns a policy object for evaluating SSL certificate chains.

Declaration

func SecPolicyCreateSSL(_ server: Bool, _ hostname: CFString?) -> SecPolicy

Parameters

  • server:

    Specify true on the client side to return a policy for SSL server certificates.

  • hostname:

    If you specify a value for this parameter, the policy will require the specified value to match the host name in the leaf certificate.

Mentioned in

Return Value

The policy object. In Objective-C, call the CFRelease function to release the object when you are finished with it.