For WAMP, this is what finally worked for me.
While it is similar to others, the solutions mentioned on this page, and other locations on the web did not work. Some «minor» detail differed.
Either the location to save the PEM file mattered, but was not specified clearly enough.
Or WHICH php.ini
file to be edited was incorrect. Or both.
I’m running a 2020 installation of WAMP 3.2.0 on a Windows 10 machine.
Link to get the pem file:
http://curl.haxx.se/ca/cacert.pem
Copy the entire page and save it as: cacert.pem
, in the location mentioned below.
Save the PEM file in this location
<wamp install directory>binphpphp<version>extrasssl
eg saved file and path: «T:wamp64binphpphp7.3.12extrassslcacert.pem»
*(I had originally saved it elsewhere (and indicated the saved location in the php.ini file, but that did not work).
There might, or might not be, other locations also work. This was the recommended location — I do not know why.)
WHERE
<wamp install directory>
= path to your WAMP installation.
eg: T:wamp64
<php version>
of php that WAMP is running: (to find out, goto: WAMP icon tray -> PHP <version number>
if the version number shown is 7.3.12, then the directory would be: php7.3.12)
eg: php7.3.12
Which php.ini file to edit
To open the proper php.ini
file for editing, goto: WAMP icon tray -> PHP -> php.ini
.
eg: T:wamp64binapacheapache2.4.41binphp.ini
NOTE: it is NOT the file in the php directory!
Update:
While it looked like I was editing the file: T:wamp64binapacheapache2.4.41binphp.ini
,
it was actually editing that file’s symlink target: T:/wamp64/bin/php/php7.3.12/phpForApache.ini
.
Note that if you follow the above directions, you are NOT editing a php.ini
file directly. You are actually editing a phpForApache.ini
file. (a post with info about symlinks)
If you read the comments at the top of some of the php.ini
files in various WAMP directories, it specifically states to NOT EDIT that particular file.
Make sure that the file you do open for editing does not include this warning.
Installing the extension Link Shell Extension allowed me to see the target of the symlink in the file Properites window, via an added tab. here is an SO answer of mine with more info about this extension.
If you run various versions of php at various times, you may need to save the PEM file in each relevant php directory.
The edits to make in your php.ini file:
Paste the path to your PEM file in the following locations.
-
uncomment
;curl.cainfo =
and paste in the path to your PEM file.
eg:curl.cainfo = "T:wamp64binphpphp7.3.12extrassslcacert.pem"
-
uncomment
;openssl.cafile=
and paste in the path to your PEM file.
eg:openssl.cafile="T:wamp64binphpphp7.3.12extrassslcacert.pem"
Credits:
While not an official resource, here is a link back to the YouTube video that got the last of the details straightened out for me: https://www.youtube.com/watch?v=Fn1V4yQNgLs.
Содержание
- cURL error 60: SSL certificate problem: unable to get local issuer certificate #275
- Comments
- ИТ База знаний
- Полезно
- Навигация
- Серверные решения
- Телефония
- Корпоративные сети
- Как заставить curl игнорировать ошибки сертификата
- Бесплатный вводный урок на онлайн курс по Linux
- Заставить curl игнорировать ошибки SSL
- Итоги
- Бесплатный вводный урок на онлайн курс по Linux
- Полезно?
- Почему?
- ИТ База знаний
- Полезно
- Навигация
- Серверные решения
- Телефония
- Корпоративные сети
- Как заставить curl игнорировать ошибки сертификата
- Бесплатный вводный урок на онлайн курс по Linux
- Заставить curl игнорировать ошибки SSL
- Итоги
- Бесплатный вводный урок на онлайн курс по Linux
- Полезно?
- Почему?
- How to Make curl Ignore Certificate Errors
- Make curl Ignore SSL Errors
- SSL: no alternative certificate subject name matches target host name
- 1 Answer 1
cURL error 60: SSL certificate problem: unable to get local issuer certificate #275
If you encounter a bug and something does not work, make sure you have done the following and check those boxes before submitting an issue — thank you!
- [X ] Pull latest dockers (e.g.: docker pull cytopia/ ) before running docker-compose up
- [X ] Specify used docker versions (php, web and database)
- [ X] Attach logs for php, mysql and webserver (found in log/ directory)
- [ X] Start with debug mode and attach docker-compose output ( .env setting DEBUG_COMPOSE_ENTRYPOINT=1 )
- [ X] Never use different mysql|mariadb versions on the same HOST_PATH_MYSQL_DATADIR on existing database files. Different mysql|mariadb versions might upgrade/corrupt existing database files. If you have done that already, start with a different path of HOST_PATH_MYSQL_DATADIR (to an empty directory) and try again.
Please also specify the following info:
- [X ] Which operating system are you at (Linux, OSX or Windows)
— Windows 10 Pro version 1803 - [ X] docker version
— Docker version 18.03.1-ce, build 9ee9f40 - [X ] docker-compose version
— docker-compose version 1.21.1, build 7641a569
I am getting this notification on my Updraft options pages.
I looked for a solution and tried a couple of things, but no luck figuring this out on my own.
I Downloaded the latest curl recognized certificates here: https://curl.haxx.se/ca/cacert.pem and placed the file in devilboxca. Then I added curl.cainfo = «certificate ./ca/cacert.pem» to my devilbox/cfg/php-ini.7.0/devilbox-custom.ini I also tried ‘certificate .cacacert.pem’
After this, the error changed to:
I used the devilbox shell script to open a shell and executed curl api.wordpress.com and the contents output to the terminal. Next, I opened a shell into the PHP container with docker exec -it 3c88083befd0 /bin/bash and executing curl api.wordpress.com . This time there was no output, but there was also no error. I just got a new command prompt.
docker-compose generated no debug output when started.
The text was updated successfully, but these errors were encountered:
Источник
ИТ База знаний
Курс по Asterisk
Полезно
— Узнать IP — адрес компьютера в интернете
— Онлайн генератор устойчивых паролей
— Онлайн калькулятор подсетей
— Калькулятор инсталляции IP — АТС Asterisk
— Руководство администратора FreePBX на русском языке
— Руководство администратора Cisco UCM/CME на русском языке
— Руководство администратора по Linux/Unix
Навигация
Серверные решения
Телефония
FreePBX и Asterisk
Настройка программных телефонов
Корпоративные сети
Протоколы и стандарты
Как заставить curl игнорировать ошибки сертификата
Если вам нужно заставить curl игнорировать ошибки сертификата, убедитесь, что вы знаете о последствиях небезопасных соединений и передач SSL.
Бесплатный вводный урок на онлайн курс по Linux
Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps
Вам следует практиковаться в пропуске проверки сертификатов только в целях разработки.
В этом руководстве вы узнаете, как заставить curl игнорировать ошибки сертификата.
Заставить curl игнорировать ошибки SSL
Основной синтаксис игнорирования ошибок сертификата с помощью команды curl :
В качестве альтернативы вы можете использовать:
Веб-сайт считается небезопасным, если у него истек срок действия, он неправильно настроен или не имеет сертификата SSL, обеспечивающего безопасное соединение. Когда вы пытаетесь использовать curl для подключения к такому веб-сайту, вывод выдает ошибку.
Примечание. Параметры —insecure (-k) аналогичны команде wget —no-check-certificate , используемой для предотвращения проверки центрами сертификации сертификата сервера.
Например, если вы запустите команду:
Вывод должен отображать содержимое URL-адреса. Однако, поскольку этот веб-сайт имеет недействительный сертификат SSL, он показывает ошибку, как в примере ниже.
Это означает, что «сертификат узла не может быть аутентифицирован с помощью известных сертификатов CA».
Чтобы обойти это ограничение, вы можете использовать параметр —insecure (или — k ), разрешающий небезопасные соединения с сервером при использовании SSL. Следовательно, вы должны запустить:
Итоги
Прочитав эту статью, вы должны знать, как заставить curl игнорировать ошибки сертификата. Хотя это делается просто путем добавления опции -k , не указывайте curl игнорировать ошибки SSL, если это не требуется для целей разработки.
Бесплатный вводный урок на онлайн курс по Linux
Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps
Полезно?
Почему?
😪 Мы тщательно прорабатываем каждый фидбек и отвечаем по итогам анализа. Напишите, пожалуйста, как мы сможем улучшить эту статью.
😍 Полезные IT – статьи от экспертов раз в неделю у вас в почте. Укажите свою дату рождения и мы не забудем поздравить вас.
Источник
ИТ База знаний
Курс по Asterisk
Полезно
— Узнать IP — адрес компьютера в интернете
— Онлайн генератор устойчивых паролей
— Онлайн калькулятор подсетей
— Калькулятор инсталляции IP — АТС Asterisk
— Руководство администратора FreePBX на русском языке
— Руководство администратора Cisco UCM/CME на русском языке
— Руководство администратора по Linux/Unix
Навигация
Серверные решения
Телефония
FreePBX и Asterisk
Настройка программных телефонов
Корпоративные сети
Протоколы и стандарты
Как заставить curl игнорировать ошибки сертификата
Если вам нужно заставить curl игнорировать ошибки сертификата, убедитесь, что вы знаете о последствиях небезопасных соединений и передач SSL.
Бесплатный вводный урок на онлайн курс по Linux
Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps
Вам следует практиковаться в пропуске проверки сертификатов только в целях разработки.
В этом руководстве вы узнаете, как заставить curl игнорировать ошибки сертификата.
Заставить curl игнорировать ошибки SSL
Основной синтаксис игнорирования ошибок сертификата с помощью команды curl :
В качестве альтернативы вы можете использовать:
Веб-сайт считается небезопасным, если у него истек срок действия, он неправильно настроен или не имеет сертификата SSL, обеспечивающего безопасное соединение. Когда вы пытаетесь использовать curl для подключения к такому веб-сайту, вывод выдает ошибку.
Примечание. Параметры —insecure (-k) аналогичны команде wget —no-check-certificate , используемой для предотвращения проверки центрами сертификации сертификата сервера.
Например, если вы запустите команду:
Вывод должен отображать содержимое URL-адреса. Однако, поскольку этот веб-сайт имеет недействительный сертификат SSL, он показывает ошибку, как в примере ниже.
Это означает, что «сертификат узла не может быть аутентифицирован с помощью известных сертификатов CA».
Чтобы обойти это ограничение, вы можете использовать параметр —insecure (или — k ), разрешающий небезопасные соединения с сервером при использовании SSL. Следовательно, вы должны запустить:
Итоги
Прочитав эту статью, вы должны знать, как заставить curl игнорировать ошибки сертификата. Хотя это делается просто путем добавления опции -k , не указывайте curl игнорировать ошибки SSL, если это не требуется для целей разработки.
Бесплатный вводный урок на онлайн курс по Linux
Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps
Полезно?
Почему?
😪 Мы тщательно прорабатываем каждый фидбек и отвечаем по итогам анализа. Напишите, пожалуйста, как мы сможем улучшить эту статью.
😍 Полезные IT – статьи от экспертов раз в неделю у вас в почте. Укажите свою дату рождения и мы не забудем поздравить вас.
Источник
How to Make curl Ignore Certificate Errors
Home » DevOps and Development » How to Make curl Ignore Certificate Errors
If you need to make curl ignore certificate errors, make sure you know the consequences of insecure SSL connections and transfers.
You should only practice skipping certificate checks for development purposes.
In this tutorial, you learn how to make curl ignore certificate errors.
Make curl Ignore SSL Errors
The basic syntax for ignoring certificate errors with the curl command is:
Alternatively, you can use:
A website is insecure if it has an expired, misconfigured, or no SSL certificate ensuring a safe connection. When you try to use curl to connect to such a website, the output responds with an error.
Note: The —insecure ( -k ) options is similar to the wget —no-check-certificate command used to avoid certificate authorities checking for a server certificate. To see how wget skips certificate checks, refer to the guide How To Use Wget Command With Examples.
For instance, if you run the command:
The output should display the content of the URL. However, since this website has an invalid SSL certificate, it shows an error as in the example below.
This means “peer certificate cannot be authenticated with known CA certificates.”
To bypass this constraint, you can use the —insecure (or -k ) option allowing insecure server connections when using SSL. Therefore, you would run:
Note: Do you know which type of SSL certificate is best for you? Check out this Ultimate Guide to Types of SSL Certificates.
After reading this article, you should know how to make curl ignore certificate errors. Although this is done simply by adding the -k option, do not instruct curl to ignore SSL errors unless required for development purposes.
Источник
SSL: no alternative certificate subject name matches target host name
At one time our company hosted our own blog which we hosted with our wildcard cert for the domain, *.example.com . We moved our company blog to Hubspot and the team at Hubspot setup a second SSL cert for www.example.com for the Hubspot hosted blog (I have no idea why this all happened before I started here).
We are now having an intermittent issue with our apex domain https://example.com. Sometimes it resolves fine but sometimes in Chrome you get the scary «Your connection is not private» warning. Hubspot’s response was to have us create a redirect with EasyRedirect, which I have done, but that hasn’t resolved it.
If I curl -vL example.com it works fine but curl -vL https://example.com gives me SSL: no alternative certificate subject name matches target host name ‘example.com’
Is there something I can do about these competing SSL certs for our apex domain?
1 Answer 1
A site binding can only have 1 SSL certificate assigned to it. It sounds like Hubspot has the www.example.com certificate bound to your site and that certificate does not have a SAN for example.com. You should do a couple things here:
- Reissue your SSL certificate and include a SAN for example.com
- Redirect anyone going to example.com to www.example.com (This will not resolve the «Your connection is not private» message until you do #1. This is because the SSL connection occurs before the site is displayed and you will not be able to redirect people until they trust your certificate.
If they were using your wildcard certificate then none of this would matter and both URLs would result in a valid certificate. Depending on how long you’ve been at the company it’s possible your wildcard certificate is expired and you’d need a new one anyway. There is probably a way to work with Hubspot to have a CSR generated and go buy your own wildcard certificate if your company wants to go that route.
Источник
‘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»;
“cURL error 60: SSL certificate problem: unable to get local issuer certificate” is a common error that occurs when your website tries to communicate with an external API via HTTPS and the SSL certificate on the server is not verified or properly configured. Although this error can be seen on any server you are more likely to see this issue on a localhost environment running on wampp/xampp.
Contact your web host to make sure that the SSL certificate is properly configured on the server. As of PHP 5.6 if the certificate is not verified you will also get a warning notice on your website.
How to fix cURL error 60: SSL certificate problem: unable to get local issuer certificate on localhost
1. Download the cacert.pem file from the official cURL website here.
2. Go the directory where you have installed xampp and put it in the ssl folder. For example,
C:xamppphpextrassslcacert.pem D:programxamppphpextrassslcacert.pem
3. Open your php.ini file and search for “curl.cainfo”.
4. Once you have found it, specify the path to the .pem file in the curl.cainfo section. For example,
curl.cainfo = "C:xamppphpextrassslcacert.pem"
The line could be commented out with a semicolon right before curl.cainfo. So make sure to uncomment it and replace ;curl.cainfo = with the line above.
5. Restart Apache so the new changes take effect on your localhost server.
That should fix the cURL error 60 issue on your web server. If you have any other suggestions for fixing this issue feel free to share it in the comments.
При отправке запроса средствами cURL можно получить ошибку: SSL certificate problem: unable to get local issuer certificate
.
Можно просто отключить проверку SSL-сертификата. Например, вот так:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://site.com'); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $result = curl_exec($ch);
Более правильным решением будет добавление сертификата в доверенные. Скачать свежую версию сертификата по адресу https://curl.haxx.se/ca/cacert.pem. Поместить данный файл на сервер. У меня это директория S:Serverbinphpextrasssl
.
Далее в настройках файла php.ini
указать путь к данному файлу:
[curl] curl.cainfo = S:Serverbinphpextrassslcacert.pem
Перезапустить apache.
// Находясь в директории bin ( путь/к/файлу/httpd ) httpd -k start httpd -k restart httpd -k stop (httpd - k shutdown) // Работа с apache как со службой Windows net stop apache2.4 net start apache2.4 // Мой httpd.exe S:ServerbinApache24binhttpd -k restart