Menu

GetSSL sample not working

jeff lee
2009-03-07
2017-12-22
  • jeff lee

    jeff lee - 2009-03-07

    The default sample passing in https://sourceForge.net is not spitting out any output.

    I can get the book post work fine and it shows me the html for a book but when I try out the ssl sample nothing happens; No error and no output.

    I put a break point at the OnSSLContext fuction and it hits there but OnWriteData never gets called.

    Any help would be appreciated, heres the code.

    Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);

                Easy easy = new Easy();

                Easy.WriteFunction wf = new Easy.WriteFunction(OnWriteData);
                easy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf);

                Easy.SSLContextFunction sf = new Easy.SSLContextFunction(OnSSLContext);
                easy.SetOpt(CURLoption.CURLOPT_SSL_CTX_FUNCTION, sf);

                easy.SetOpt(CURLoption.CURLOPT_URL, "https://sourceforge.net/");
                easy.SetOpt(CURLoption.CURLOPT_CAINFO, "ca-bundle.crt");

                easy.Perform();
                easy.Cleanup();

                Curl.GlobalCleanup();

     
  • Andrea Facchin

    Andrea Facchin - 2017-12-22

    easy.SetOpt(CURLoption.CURLOPT_SSL_VERIFYPEER, false);
    easy.SetOpt(CURLoption.CURLOPT_SSL_VERIFYHOST, false);

    are missing

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.