pub unsafe extern "C-unwind" fn SecureDownloadCreateWithTicket(
ticket: Option<&CFData>,
setup: SecureDownloadTrustSetupCallback,
setup_context: *mut c_void,
evaluate: SecureDownloadTrustEvaluateCallback,
evaluate_context: *mut c_void,
download_ref: *mut SecureDownloadRef,
) -> i32
SecTrust
and SecureDownload
only.Expand description
Create a SecureDownloadRef for use during the Secure Download process.
Parameter ticket
: The download ticket.
Parameter setup
: Called before trust is verified for each signer of the ticket.
This allows the user to modify the SecTrustRef if needed
(see the SecTrust documentation). Returns a SecureDownloadTrustCallbackResult (see).
Parameter setupContext
: User defined. Passed as a parameter to the setupCallback.
Parameter evaluate
: Called after SecTrustEvaluate has been called for a
signer if the result was not trusted. This allows
the developer to query the user as to whether or not
to trust the signer. Returns a SecTrustResultType
Parameter evaluateContext
: User defined. Passed as a parameter to the evaluate callback.
Parameter downloadRef
: The returned reference.
Returns: Returns errSecureDownloadInvalidTicket if the ticket was invalid. Otherwise see “Security Error Codes” (SecBase.h). .
§Safety
ticket
might not allowNone
.setup
must be implemented correctly.setup_context
must be a valid pointer.evaluate
must be implemented correctly.evaluate_context
must be a valid pointer.download_ref
must be a valid pointer.