I have problem with https://core.telegram.org/bots.
- Get token from BotFather.
Create self-signed ssl sertificate (https://core.telegram.org/bots/self-signed):
openssl req -newkey rsa:2048 -sha256 -nodes -keyout YOURPRIVATE.key -x509 -days 365 -out YOURPUBLIC.pem -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=YOURDOMAIN.EXAMPLE"
Run server:
openssl s_server -accept 88 -key YOURPRIVATE.key -cert YOURPUBLIC.pem
Send hook:
curl -F "url=https://URL:88/bot" -F "[email protected]" https://api.telegram.org/botTOKEN/setWebhook
Answer:
{"ok":true,"result":true,"description":"Webhook was set"}
Telegram connect to my server. Error:
139690177754952:error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown:s3_pkt.c:1257:SSL alert number 46
Test:
openssl s_client -connect URL:88
OK. No problem.
How to:
- Run openssl s_client ... as Telegram. Use -cert YOURPUBLIC.pem not work.
- Fix this problems and recive data.