Exemplo n.º 1
0
        public SecStatusCode Evaluate(DispatchQueue queue, SecTrustCallback handler)
        {
            // headers have `dispatch_queue_t _Nullable queue` but it crashes... don't trust headers, even for SecTrust
            if (queue == null)
            {
                throw new ArgumentNullException(nameof(queue));
            }
            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            BlockLiteral block_handler = new BlockLiteral();

            try {
                block_handler.SetupBlockUnsafe(evaluate, handler);
                return(SecTrustEvaluateAsync(Handle, queue.Handle, ref block_handler));
            }
            finally {
                block_handler.CleanupBlock();
            }
        }
Exemplo n.º 2
0
 extern static SecStatusCode /* OSStatus */ SecTrustEvaluateAsync(IntPtr /* SecTrustRef */ trust, IntPtr /* dispatch_queue_t */ queue, SecTrustCallback result);
Exemplo n.º 3
0
 static extern SecStatusCode SecTrustEvaluateAsync(IntPtr /* SecTrustRef */ trust, IntPtr /* dispatch_queue_t */ queue, SecTrustCallback result);