• Resolved sparkweb

    (@sparkweb)


    I have a need to be able to set CURLOPT_CAINFO on my WP_HTTP calls and I haven’t been able to find a filter that would let me set a specific curlopt using the WordPress HTTP library. I need to be able to set this:

    curl_setopt($ch, CURLOPT_CAINFO, __DIR__ . “/DigiCertCA.crt”);

    …because I hate having my customers turn off peer validation. Hoping to I don’t have go back to using cURL directly. Thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Use the action ‘http_api_curl’? Your callback is passed the cURL handle by reference, inside an array.(?! I guess the only way to pass by reference inside a class.)

    Line 1218 of class-http.php: do_action_ref_array( 'http_api_curl', array(&$handle) );

    Thread Starter sparkweb

    (@sparkweb)

    @bcworkz, that’s exactly what I was looking for. Thanks so much for pointing that out!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP_HTTP and CURLOPT_CAINFO’ is closed to new replies.