Upgrade to WP 3.5.1 Network – SSL peer certificate or SSH remote key was not OK
-
I just upgraded our site to WordPress 3.5.1 and we have a Network installation using subdomains. After running the update successfully I told it to run the Network Update and I kept getting this error message:
Warning! Problem updating Error message: SSL peer certificate or SSH remote key was not OK
Immediately I realized that I was getting this message since we are using a non-wildcard certificate. I did some reasearch and discovered that this is a cURL error message and that the CURLOPT_SSL_VERIFYHOST php option enables or disables SSL certificate verification.
I then ran grep -ri “CURLOPT_SSL_VERIFYHOST” * from the root of our WordPress installation and found a line in /wp-includes/class-http.php and I changed that line from:
curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false );
To:
curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === false ) ? 2 : false );
…and now it allows me to run the Network Update.
Just thought I’d post this here incase someone else is too lazy (or cheap) to pay for a wildcard certificate and finds themselves in the same situation ??
- The topic ‘Upgrade to WP 3.5.1 Network – SSL peer certificate or SSH remote key was not OK’ is closed to new replies.