I am getting cURL error 60: SSL certificate problem, tried some solutions to fix it, but nothing worked, I tried:
1 Updated certificate:
if( isset( $_GET['update-wp-ca-bundle'] ) ){
$crt_file = ABSPATH . WPINC . '/certificates/ca-bundle.crt';
$new_crt_url = 'http://curl.haxx.se/ca/cacert.pem';
if( is_writable( $crt_file ) ){
$new_str = file_get_contents( $new_crt_url );
if( $new_str && strpos( $new_str, 'Bundle of CA Root Certificates' ) ){
$up = file_put_contents( $crt_file, $new_str );
echo $up ? 'OK: ca-bundle.crt updated' : 'ERROR: can`t put data to ca-bundle.crt';
}
else {
echo 'ERROR: can\'t download curl.haxx.se/ca/cacert.pem';
}
}
else {
echo 'ERROR: ca-bundle.crt not writable';
}
exit;
}
Then Visited: https://example.com/?update-wp-ca-bundle
Certificate got updated.
still issue not fixed.
- Tried bypassing ssl verify: https://wordpress.org/plugins/ssl-certificate-manager/
Still it is not fixed.
PHP Version: 7.2
SSL Version : OpenSSL/1.0.2g
As I can see, SSL certificate is valid, it is not expired.