Example #1
0
        // called by libcurlshim
        private static int SSLCtxDelegate(IntPtr ctx, IntPtr parm)
        {
            int      ok   = (int)CURLcode.CURLE_OK;
            GCHandle gch  = (GCHandle)parm;
            Easy     easy = (Easy)gch.Target;

            if (easy == null)
            {
                return(ok);
            }
            if (easy.m_pfSSLContext == null)
            {
                return(ok);  // keep going
            }
            SSLContext context = new SSLContext(ctx);

            return((int)easy.m_pfSSLContext(context, easy.m_sslContextData));
        }