Mediaget curl error 60

cURL error 60 ssl certificate problem ‘cURL error 60 SSL certificate problem’ occurs when we make a cURL call to third party services. Here at Bobcares, we have seen several such cURL command related errors as part of our Server Management Services for web hosts and online service providers. Today we’ll take a look […]

Содержание

  1. cURL error 60 ssl certificate problem
  2. What causes ‘cURL error 60 SSL certificate problem’ error to occur
  3. How we fix the error ‘cURL error 60 SSL certificate problem’
  4. Conclusion
  5. PREVENT YOUR SERVER FROM CRASHING!
  6. cURL error 60: SSL certificate problem: unable to get local issuer certificate
  7. Why Does This Error Occur?
  8. How To Resolve: unable to get local issuer certificate error?
  9. Перестали работать запросы в WordPress: cURL error 60: SSL certificate has expired
  10. Почему мы видим ошибку certificate has expired?
  11. Решение ошибки: cURL error 60: SSL certificate has expired
  12. Вариант 1
  13. Вариант 2
  14. Ошибка загрузки. Ошибка cURL 60: проблема с сертификатом SSL: срок действия сертификата истек
  15. Topic on Extension talk:VisualEditor

cURL error 60 ssl certificate problem

‘cURL error 60 SSL certificate problem’ occurs when we make a cURL call to third party services.

Here at Bobcares, we have seen several such cURL command related errors as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at the causes for this error and see the fix.

What causes ‘cURL error 60 SSL certificate problem’ error to occur

Digital certificates are mainly used in transferring sensitive content. These digital certificates are issued by certificate authorities or CA.

When a cURL receives a server CA that is not signed by one of the trusted certificates in the installed CA certificate store, then it will lead to an error: “failed to verify the legitimacy of the server” during the SSL handshake. As a result, SSL will then refuse the communication with the server leading to an SSL error.

In short, this error occurs because cURL makes sure to verify and make a secure connection request using a self-signed certificate. But when it doesn’t find any valid certificate then it throws this error message.

How we fix the error ‘cURL error 60 SSL certificate problem’

Now let’s see how our Support Engineers resolve this error message.

1. Re-download the cURL CA-Bundle from the cURL site to fix this error. Here are the steps for it.

  • First, download the “cacert.pem” from the link: http://curl.haxx.se/docs/caextract.html
  • Next copy the complete page and save it as “cacert.pem
  • Now, open the php.ini file and add the following line in it.
    curl.cainfo = “[pathtofile]cacert.pem”
    In, case, if the php.ini file doesn’t have the curl.cainfo line, then just add it to the end of the file. Then add the file path where cacert.pem file is saved.
  • Finally, restart the web server or on Windows, restart the application pool and try the request again.

2. If the insecure certificate is a self-signed, known-trusted certificate, then load the certificate to your local trusted certificate location for your OS.

[Need any further assistance in fixing curl errors? – We are here to help you.]

Conclusion

In short, this error occurs when cURL doesn’t find any valid certificate to communicate over https. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

cURL error 60: SSL certificate problem: unable to get local issuer certificate

Last updated on June 17, 2022 by ScratchCode Team

Often, cURL error 60: SSL certificate problem: unable to get local issuer certificate error occurs when we try to call the API with the secure https:// protocol in the request URL. In this article, we will discuss why does this error occur? how to resolve: unable to get local issuer certificate error occurs? Let’s jump into it.

Table of Contents
1. Why This Error Occurs?
2. How To Resolve: cURL error 60?

Why Does This Error Occur?

Just go to your API call code and try to run the request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate.

This error occurs because the API call makes a secure connection request using the self-signed certificate. When it does not find a valid certificate, it throws an error.

It has a very very simple solution. We just need to download the certificate and set the path. Are you ready? Then let’s set up an SSL certificate step by step as below:

How To Resolve: unable to get local issuer certificate error?

  1. Download the “cacert.pem” free certificate file from the official website here: http://curl.haxx.se/docs/caextract.html
  2. Move the cacert.pem file in a reachable destination for the PHP. It is advisable to move the file for the WAMP user to C:wamp64binphpcacert.pem , for XAMPP user to C:xamppphpextrassslcacert.pem, for the AMPPS user to C:Program Files (x86)Amppsphpextrassslcacert.pem
  3. Now, open your php.ini file and find the “curl.cainfo” option. You will see something like the following:
  1. After that, we need to add the path of the certificate to “curl.cainfo” and remove semicolon(;) as follow:
  1. The very very most important step is to save and close your php.ini. Restart your web server and try your request again. If you do not set the right path, then you will experience a CURL 77 error.

Hurray! we have completed all steps to solve unable to get local issuer certificate error.

Additionally, read our guide:

That’s it from our end. We hope this article helped you to resolve cURL error 60: SSL certificate problem: unable to get local issuer certificate error.

Please let us know in the comments if everything worked as expected, your issues, or any questions. If you think this article saved your time & money, please do comment, share, like & subscribe. Thank you for reading this post. 🙂 Keep Smiling! Happy Coding!

Источник

Перестали работать запросы в WordPress: cURL error 60: SSL certificate has expired

C 30 сентября 2021 года на сайтах WordPress, для которых был установлен сертификат Let’s Encrypt, могут перестать работать HTTP API запросы.

Например такой запрос будет выдавать ошибку:

cURL error 60: SSL certificate problem: certificate has expired

Такую ошибку можно будет увидеть где угодно, например:

  • в админке при проверке обновлений WordPress
  • при проверке обновлений плагинов
  • при обращении к апи любого сервиса. Например, перестанет работать плагин TinyPNG — JPEG, PNG & WebP image compression и куча других, которые используют какие бы то ни было запросы.

Почему мы видим ошибку certificate has expired?

Почему так происходит подробно расписано на хабре.

Если коротко, то в ядре WP есть файл корневых сертификатов /wp-includes/certificates/ca-bundle.crt который используется для проверки SSL всех запросов созданных через HTTP API. В этом файле просрочен один из корневых сертификатов на основе которого был создан сертификат для вашего сайта. Поэтому запрос не может пройти проверку и выдается такая ошибка.

С очередными обновлениями WP эта ошибка должна пропасть, но вот что делать если решение нужно уже сегодня, или если вы не планируете обновлять WordPress, а рабочие HTTP запросы нужны.

Решение ошибки: cURL error 60: SSL certificate has expired

Вариант 1

Нужно обновить контент файла /wp-includes/certificates/ca-bundle.crt изменить его на контент этого файла https://curl.haxx.se/ca/cacert.pem.

Изменять в данном случае файл ядра допустимо, потому что при следующем обновлении WP проблема исчезнет. См. соответствующий коммит на GitHub.

Это можно сделать вручную:

  1. Скачайте файл по ссылке https://curl.haxx.se/ca/cacert.pem.
  2. Обновите контент /wp-includes/certificates/ca-bundle.crt контентом из скаченного файла.

Или используйте следующий код

Использовать код удобно, когда у вас есть возможность запустить код из админки или как-то еще, например через плагин Code Snippets.

Добавьте следующий код куда угодно и перейдите на страницу http://ВАШСАЙТ.com/?update-wp-ca-bundle .

После использования, код нужно удалить.

Вариант 2

Решить проблему можно через хук http_request_args. Этот хук нужно использовать в MU плагине.

Создайте файл loader.php в папке wp-content/mu-plugins (если такой папки у вас нет, создайте её).

Добавьте следующий код в этот файл:

Создайте папку wp-content/mu-plugins/fix-wp-ca-bundle .

Создайте файлы: main.php и ca-bundle.crt в папке fix-wp-ca-bundle .

Добавьте следующий код в эти файлы.

Код файла main.php :

Контент файла ca-bundle.crt :

Должна получится такая структура:

Готово! Теперь все должно работать как и прежде.

Источник

Ошибка загрузки. Ошибка cURL 60: проблема с сертификатом SSL: срок действия сертификата истек

Я получаю эту ошибку «

Download failed. cURL error 60: SSL certificate problem: certificate has expired

при установке плагина на WordPress.

Я пробовал много решений, в которых говорилось, что нужно создать php.ini в каталоге wp-admin и указать абсолютный путь к «cacert.pem» . Я сделал столько решений, сколько предлагал.

Вот путь, который я даю в php.ini curl.cainfo=/shop/wp-admin/cacert.pem .

WordPress установлен в каталоге магазина.

Я все еще получаю ту же ошибку. Есть идеи, в чем может быть проблема? Спасибо

Ошибка кажется очевидной: сертификат имеет истекший. Сертификаты имеют срок годности. После этой даты сертификат необходимо заменить новым.

President James K. Polk

Дата истечения срока действия сертификата 12.08.2018 И они автоматически обновляют его по истечении срока действия.

Так почему же сертификат не обновился?

Срок действия сертификата истек. Это не может быть решено обновлением доверенного хранилища ( cacert.pem ), а только обновлением сертификата, который отправляет сервер.

The expiry date of the certificate is 08/12/2018. And they automatically update it when expired.

Учитывая, что проверка выполняется по сертификату, отправленному сервером в рамках подтверждения SSL, а не по какой-то локально кэшированной копии, похоже, что им не удалось обновить сертификат, т.е. что-то с автоматическим процессом пошло не так. Опять же, это проблема на стороне сервера, и клиент ничего не может сделать, чтобы ее исправить, кроме игнорирования проблемы (т.е. отключения проверки), что, конечно, не рекомендуется.

Я просто обновлено SSL и все еще получаю ту же ошибку

@AbdulR .: если проблема не исчезла, значит, обновление было неправильным или неполным. Об обновленном сервере ничего не известно, но типичные ошибки заключаются в том, что вы пытались установить неправильный сертификат, установили правильный в неправильном месте или забыли перезапустить сервер, чтобы новая конфигурация вступила в силу. Обратите внимание, что вам, конечно, необходимо обновить соответствующий сертификат — т.е. если загрузка какого-либо плагина не удалась, должен быть исправлен сертификат для сайта, предоставляющего плагин, а не сертификат для вашего личного сайта.

Источник

Topic on Extension talk:VisualEditor

When using MediaWikis VisualEditor, I get this error:

Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK

When setting up lighttpd to use https I did the following:

— created a private key and a private CA certificate, so my private server can sign certificates (ca.key, ca.pem)

— created a key and a certificate signing request for lighttpd and signed it with my CA certificate (key.pem, server.pem)

— added my own CA certificate to trusted certificates (trust anchor —store=/. /ca.pem)

openssl verifiy /. /ca.pem

I get OK as answer — this makes sense, because I added the CA certificate.

openssl verifiy /. /server.pem

I also get OK , because the request was signed with the CA certificate.

But I don’t understand, why now curl print this error?

Shouldn’t also curl trust my both certificates as openssl shows?

openssl validates the certificate is valid as per expiration dates and signature, but it doesn’t validate it’s trusted.

curl validates against the list of trusted CA, and your CA is not trusted according to curl, probably because you’re using a self-signed certificate or signed by a CA you created.

You’ll have to add that CA to the trusted CA store of the server.

I think, I’ve done exactly this by executing

trust anchor —store=/. /ca.pem

So my self-signed CA certificate should belong to the trusted CA store, or doesn’t it?

I was checking this in the following way:

— created ca.pem (CA certificate) and server.pem (certificate for lighttpd)

— verified ca.pem with openssl verifiy /. /ca.pem -> Result: verification failed

— verified server.pem with openssl verifiy /. /server.pem -> Result: verification failed

— executed trust anchor —store=/. /ca.pem

— verified ca.pem with openssl verifiy /. /ca.pem -> Result: OK

— verified server.pem with openssl verifiy /. /server.pem -> Result: OK

So everything behaved as expected: the verification of my self-signed CA certificate and my CA-signed server certificate failed until I added the CA certificate to the trusted certificates of the server

I guess php-curl uses a different ca trust store than the curl binary

Another solution would be an option to ignore cert errors, but this doesn’t seem to be supported right now. Another question would be why would you use https in the first place? One of the suggested solutions is to allow unencrypted connections between MediaWiki and parsoid (which is MediaWiki itself), although it may have other complications as well.

I’ve found the reason:

There have been two problems:

1: The certificate-file required for using https under lighttpd ( ssl.pemfile in lighttpd.conf ) did only contain the server certificate but not the whole bundle. So I only needed to put the server and the CA certificate into one file and use this

cat /. /server.pem /. /ca.pem > /. /lighttpd/certs/bundle.pem

2: The encrpytion I used for my CA certificate was not TLS v1.3 compatible. After creating all keys and certificates again, signing the server certificate request with the CA certificate and adding the CA certificate to the trusted on my server everything went well.

Источник

‘cURL error 60 SSL certificate problem’ occurs when we make a cURL call to third party services.

Here at Bobcares, we have seen several such cURL command related errors as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at the causes for this error and see the fix.

What causes ‘cURL error 60 SSL certificate problem’ error to occur

Digital certificates are mainly used in transferring sensitive content. These digital certificates are issued by certificate authorities or CA.

When a cURL receives a server CA that is not signed by one of the trusted certificates in the installed CA certificate store, then it will lead to an error: “failed to verify the legitimacy of the server” during the SSL handshake. As a result, SSL will then refuse the communication with the server leading to an SSL error.

In short, this error occurs because cURL makes sure to verify and make a secure connection request using a self-signed certificate. But when it doesn’t find any valid certificate then it throws this error message.

How we fix the error ‘cURL error 60 SSL certificate problem’

Now let’s see how our Support Engineers resolve this error message.

1. Re-download the cURL CA-Bundle from the cURL site to fix this error. Here are the steps for it.

  • First, download the “cacert.pem” from the link: http://curl.haxx.se/docs/caextract.html
  • Next copy the complete page and save it as “cacert.pem
  • Now, open the php.ini file and add the following line in it.
    curl.cainfo = “[pathtofile]cacert.pem”
    In, case, if the php.ini file doesn’t have the curl.cainfo line, then just add it to the end of the file. Then add the file path where cacert.pem file is saved.
  • Finally, restart the web server or on Windows, restart the application pool and try the request again.

2. If the insecure certificate is a self-signed, known-trusted certificate, then load the certificate to your local trusted certificate location for your OS.

[Need any further assistance in fixing curl errors? – We are here to help you.]

Conclusion

In short, this error occurs when cURL doesn’t find any valid certificate to communicate over https. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Home » cURL error 60: SSL certificate problem: unable to get local issuer certificate

Last updated on June 17, 2022 by

Often, cURL error 60: SSL certificate problem: unable to get local issuer certificate error occurs when we try to call the API with the secure https:// protocol in the request URL. In this article, we will discuss why does this error occur? how to resolve: unable to get local issuer certificate error occurs? Let’s jump into it.

Why Does This Error Occur?

Just go to your API call code and try to run the request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate.

This error occurs because the API call makes a secure connection request using the self-signed certificate. When it does not find a valid certificate, it throws an error.

It has a very very simple solution. We just need to download the certificate and set the path. Are you ready? Then let’s set up an SSL certificate step by step as below:

How To Resolve: unable to get local issuer certificate error?

  1. Download the “cacert.pem” free certificate file from the official website here: http://curl.haxx.se/docs/caextract.html
  2. Move the cacert.pem file in a reachable destination for the PHP. It is advisable to move the file for the WAMP user to C:wamp64binphpcacert.pem, for XAMPP user to C:xamppphpextrassslcacert.pem, for the AMPPS user to C:Program Files (x86)Amppsphpextrassslcacert.pem
  3. Now, open your php.ini file and find the “curl.cainfo” option. You will see something like the following:
  1. After that, we need to add the path of the certificate to “curl.cainfo” and remove semicolon(;) as follow:
curl.cainfo = "C:wamp64binphpcacert.pem"
  1. The very very most important step is to save and close your php.ini. Restart your web server and try your request again. If you do not set the right path, then you will experience a CURL 77 error.

Hurray! we have completed all steps to solve unable to get local issuer certificate error.

Additionally, read our guide:

  1. Specified Key Was Too Long Error In Laravel
  2. Run PHP Artisan Commands On Shared Hosting Servers
  3. How To Calculate Age From Birthdate
  4. Active Directory Using LDAP in PHP or Laravel
  5. How To Use The Laravel Soft Delete
  6. How To Add Laravel Next Prev Pagination
  7. Best Way to Remove Public from URL in Laravel
  8. Difference Between Factory And Seeders In Laravel
  9. Difference Between Events and Observers In Laravel
  10. Session Not Working In Laravel
  11. How To Install Vue In Laravel 8 Step By Step
  12. How To Handle Failed Jobs In Laravel
  13. Best Ways To Define Global Variable In Laravel
  14. How To Get Latest Records In Laravel
  15. Laravel Twilio Send SMS Tutorial With Example
  16. How To Pass Laravel URL Parameter
  17. Laravel 9 Resource Controller And Route With Example
  18. Laravel 9 File Upload Tutorial With Example
  19. How To Schedule Tasks In Laravel With Example
  20. Laravel Collection Push() And Put() With Example

That’s it from our end. We hope this article helped you to resolve cURL error 60: SSL certificate problem: unable to get local issuer certificate error.

Please let us know in the comments if everything worked as expected, your issues, or any questions. If you think this article saved your time & money, please do comment, share, like & subscribe. Thank you for reading this post. 🙂 Keep Smiling! Happy Coding!

C 30 сентября 2021 года на сайтах WordPress, для которых был установлен сертификат Let’s Encrypt, могут перестать работать HTTP API запросы.

Например такой запрос будет выдавать ошибку:

$res = wp_remote_get( 'https://wp-kama.ru/' );

if( is_wp_error( $res ) ){
	echo $res->get_error_message();
}

Получим:

cURL error 60: SSL certificate problem: certificate has expired

Такую ошибку можно будет увидеть где угодно, например:

  • в админке при проверке обновлений WordPress
  • при проверке обновлений плагинов
  • при обращении к апи любого сервиса. Например, перестанет работать плагин TinyPNG — JPEG, PNG & WebP image compression и куча других, которые используют какие бы то ни было запросы.

Почему мы видим ошибку certificate has expired?

Почему так происходит подробно расписано на хабре.

Если коротко, то в ядре WP есть файл корневых сертификатов /wp-includes/certificates/ca-bundle.crt который используется для проверки SSL всех запросов созданных через HTTP API. В этом файле просрочен один из корневых сертификатов на основе которого был создан сертификат для вашего сайта. Поэтому запрос не может пройти проверку и выдается такая ошибка.

С очередными обновлениями WP эта ошибка должна пропасть, но вот что делать если решение нужно уже сегодня, или если вы не планируете обновлять WordPress, а рабочие HTTP запросы нужны.

Решение ошибки: cURL error 60: SSL certificate has expired

Вариант 1

Нужно обновить контент файла /wp-includes/certificates/ca-bundle.crt изменить его на контент этого файла https://curl.haxx.se/ca/cacert.pem.

Изменять в данном случае файл ядра допустимо, потому что при следующем обновлении WP проблема исчезнет. См. соответствующий коммит на GitHub.

Это можно сделать вручную:

  1. Скачайте файл по ссылке https://curl.haxx.se/ca/cacert.pem.
  2. Обновите контент /wp-includes/certificates/ca-bundle.crt контентом из скаченного файла.

Или используйте следующий код

Использовать код удобно, когда у вас есть возможность запустить код из админки или как-то еще, например через плагин Code Snippets.

Добавьте следующий код куда угодно и перейдите на страницу http://ВАШСАЙТ.com/?update-wp-ca-bundle.

/**
 * Goto http://yoursite.com/?update-wp-ca-bundle
 */
if( isset( $_GET['update-wp-ca-bundle'] ) ){

	$crt_file = ABSPATH . WPINC . '/certificates/ca-bundle.crt';
	$new_crt_url = 'https://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: cant download https://curl.haxx.se/ca/cacert.pem';
		}
	}
	else {
		echo 'ERROR: ca-bundle.crt not writable';
	}

	exit;
}

После использования, код нужно удалить.

Вариант 2

Решить проблему можно через хук http_request_args. Этот хук нужно использовать в MU плагине.

  1. Создайте файл loader.php в папке wp-content/mu-plugins (если такой папки у вас нет, создайте её).

  2. Добавьте следующий код в этот файл:

    <?php
    
    require_once __DIR__ .'/fix-wp-ca-bundle/main.php';
  3. Создайте папку wp-content/mu-plugins/fix-wp-ca-bundle.

  4. Создайте файлы: main.php и ca-bundle.crt в папке fix-wp-ca-bundle.

    Добавьте следующий код в эти файлы.

    Код файла main.php:

    <?php
    
    defined( 'ABSPATH' ) || exit;
    
    /**
     * Update the path to the WordPress trusted root certificates.
     *
     * Actual certificates can be downloaded at this link: http://curl.haxx.se/ca/cacert.pem
     */
    add_filter( 'http_request_args', 'http_request_change_sslsertificates' );
    
    function http_request_change_sslsertificates( $parsed_args ){
    
    	$parsed_args[ 'sslcertificates' ] = __DIR__ . '/ca-bundle.crt';
    
    	return $parsed_args;
    }

    Контент файла ca-bundle.crt:

    Скопируйте контент этого файла http://curl.haxx.se/ca/cacert.pem

Должна получится такая структура:

Готово! Теперь все должно работать как и прежде.

Понравилась статья? Поделить с друзьями:
  • Mean square error image
  • Mean square error formula
  • Mean square error calculation
  • Mean relative error
  • Medal of honor spearhead error