Wp_remote_post returns an error when connecting SSL

I use wp_remote_post to send some information to a secure connection like this

 $url = 'https://example.com/path/file.json'; wp_remote_post($url, array( 'sslverify' => false, 'timeout' => 60, 'body' => $body, )); 

But I get an error message:

 SSL: CA certificate set, but certificate verification is disabled 

Am I, although sslverify set to false should prevent this?

If I set sslverify => true , it works, but can cause problems on other servers

Here's the full wp_error object:

 WP_Error Object ( [errors:WP_Error:private] => Array ( [http_request_failed] => Array ( [0] => SSL: CA certificate set, but certificate verification is disabled ) ) [error_data:WP_Error:private] => Array ( ) ) 

This may be related, but in Apache 2.2 it works when Apache 2.4 is down

+6
source share
1 answer

It looks like your Apache 2.2 and 2.4 configurations are different. In 2.4, you probably have SSLVerifyClient installed, which will make it act like what you are describing. You need to set it equal: http://httpd.apache.org/docs/current/mod/mod_ssl.html#SSLVerifyClient

+1
source

Source: https://habr.com/ru/post/976968/


All Articles