Function

SecureDownloadCreateWithTicket

Creates a secure download object for use during the download process.

Declaration

OSStatus SecureDownloadCreateWithTicket(CFDataRef ticket, SecureDownloadTrustSetupCallback setup, void *setupContext, SecureDownloadTrustEvaluateCallback evaluate, void *evaluateContext, SecureDownloadRef *downloadRef);

Parameters

ticket

The download ticket.

setup

A pointer to a function that Secure Download calls before trust is verified for each signer of the ticket. This allows you to modify the SecTrustRef if needed. The callback returns a SecureDownloadTrustCallbackResult.

setupContext

An arbitrary context passed to the setup callback.

evaluate

A pointer to a function that Secure Download calls after calling SecTrustEvaluate for a signer if the result was not trusted. This allows you to query the user as to whether or not to trust the signer by returning a SecTrustResultType value.

evaluateContext

An arbitrary context passed to the evaluate callback.

downloadRef

A pointer that is set to the new download reference.

Return Value

A result code. See Secure Download Result Codes.

See Also

Download Creation

SecureDownloadTrustEvaluateCallback

Optionally queries the user how to handle a failed trust evaluation.

SecureDownloadTrustSetupCallback

Determines whether trust for a particular signer should be evaluated.

SecureDownloadTrustCallbackResult

A flag used to indicate whether or not a signer should be evaluated.

SecureDownloadRef

An opaque type representing a secure download object.