Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL certificate problem: self signed certificate in certificate chain #116

Closed
Nirvanatin opened this issue Mar 9, 2016 · 4 comments
Closed

Comments

@Nirvanatin
Copy link

I am using GetUpdate method but I am still facing SSL error. What settings I need to set in GetUpdate method?

2016-03-09 13:38:22 exception 'Longman\TelegramBot\Exception\TelegramException' with message 'SSL certificate problem: self signed certificate in certificate chain' in C:\xampp\htdocs\t\src\Request.php:162
Stack trace:
#0 C:\xampp\htdocs\t\src\Request.php(239): Longman\TelegramBot\Request::executeCurl('getUpdates', Array)
#1 C:\xampp\htdocs\t\src\Request.php(397): Longman\TelegramBot\Request::send('getUpdates', Array)
#2 C:\xampp\htdocs\t\src\Telegram.php(359): Longman\TelegramBot\Request::getUpdates(Array)
#3 C:\xampp\htdocs\t\getUpdatesCLI.php(22): Longman\TelegramBot\Telegram->handleGetUpdates()
#4 {main}

@MBoretto
Copy link
Collaborator

MBoretto commented Mar 9, 2016

Seem that you configuration can't start ssl connection.
Which os version? php version? curl version?
Maybe your machine is using some obsolete ssl cipher that the telegram server don't support anymore.

@Nirvanatin
Copy link
Author

Windows 8.1, PHP Version 5.6.8, curl 7.40.0.
I don't want to use webhook method thus it doesn't require SSL, right?

@noplanman
Copy link
Member

Looks like a PHP/cURL issue, because it's sending the request using SSL to the Telegram API.
You are correct that you don't need any SSL to use the getUpdates() method, but your server needs an up to date CA bundle to communicate with the Telegram API server.

I found this guide for Windows online: https://wiki.cacert.org/HowTo/InstallCAcertRoots
As I don't use Windows I can't confirm that this works, but maybe you could give it a try and report back.

@MBoretto
Copy link
Collaborator

Feel free to reopen this if you need

@MBoretto MBoretto reopened this Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants