user1121799
user1121799

Reputation: 11

What Wordpress scripts use curl - having problems with SSL CA authentication

I'm new to Wordpress and I'm trying to use the standard RSS widget to include a twitter feed on my site. It's simple enough to enter the the RSS URL : https://twitter.com/statuses/user_timeline/mytwitterfeed.rss

However, I get the following error: RSS Error: WP HTTP Error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I understand the quick fix is to add this to the script before curl_exec(): curl_setopt($resCurl, CURLOPT_SSL_VERIFYPEER, false);

However, I cannot find which php script with wp-admin/wp-content/wp-plugins that call curl.

wp-plugins seems to only contain new plugins to extend what the core WP site offers. Where are the standard widgets stored?

I've tried all the obvious places and Windows 7 content search is not turning up any results for the word "curl". (I've tried many variations!)

Please can someone help me?

Kind thanks

Upvotes: 1

Views: 4743

Answers (4)

PrivateUser
PrivateUser

Reputation: 4534

Just change your rss feed url from

https://twitter.com/statuses/user_timeline/mytwitterfeed.rss

to

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=twitter

The feed will still work.

Just check this link

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=twitter

Upvotes: 0

Emil Uzelac
Emil Uzelac

Reputation: 21

There are two options:

  • If you want the Twitter feed without the SSL hassle, just install one of the Twitter Feed plugins, such as Jetpack and add the feed in one of your sidebars. This is usually the easiest way.
  • Contact your hosting provider and let them "fix" the SSL issue. I personally would not turn the SSL verification, it definitely defeats the purpose.

Upvotes: 2

Luis
Luis

Reputation: 11

You just have to add this filter to your theme or plugin

add_filter('https_ssl_verify', '__return_false');

Upvotes: 1

HeatfanJohn
HeatfanJohn

Reputation: 7333

I found curl_exec in wp-includes\class-http.php inside a PHP class named WP_Http_Curl

To me this implies that WP probably uses curl for internal purposes. You should be able to embed curl_setopt call there. But this will disable this verification for all requests.

It is possible that your verification error may be caused by curl not including CA cert bundle being used by curl inside WP. See http://curl.haxx.se/docs/sslcerts.html for more details on how to update this.

Upvotes: 0

Related Questions