Page 1 of 1

ssl verification error

Posted: 1. Oct 2021, 04:08
by kamran.rizwani
Hi
I'm using pushsafer API to send notification. For some reason today the notifications have stopped going out. The error is related to "ssl_verification failed" to safer endpoint. If i disable ssl_verification in code then notification goes out. Can you please help resolve issue

Re: ssl verification error

Posted: 1. Oct 2021, 06:01
by admin
Hello, how you send the notification, can you provide your code!

Re: ssl verification error

Posted: 5. Oct 2021, 10:40
by burcbuluklu
I'm having the same problem for the last few days on my python code. Here is the ss of the error;
Image

Re: ssl verification error

Posted: 5. Oct 2021, 11:06
by admin
Hello,

can you provide your script for sending notification by pushsafer.

Our SSL Certificate changes every 4 month!
So you have to clean your cache or disable SSL-Verification in your request.

Kevin

Re: ssl verification error

Posted: 11. Oct 2021, 10:48
by burcbuluklu
This is my script. How should I change it to work again?

Re: ssl verification error

Posted: 11. Oct 2021, 19:56
by admin
Please do not post your private key, i've deleted your image.
What python version you use? Can you provide a little more from your script.

I use Python3.6x and it works without any error.

Thanks Kevin

Re: ssl verification error

Posted: 12. Oct 2021, 06:15
by kamran.rizwani
Hi Kevin
Thanks for the reply. I have disable ssl verification for now so that we can keep services running. The problem started happening after 30Sep,2021. For more context
https://www.statuscake.com/blog/lets-en ... explained/

How would i clear out cache if i enable ssl verification?

regards
kamran

Re: ssl verification error

Posted: 12. Oct 2021, 09:14
by admin
Hello,

Quote by Let's Encrypt
On September 30 2021, there will be a small change in how older browsers and devices trust Let’s Encrypt certificates. If you run a typical website, you won’t notice a difference - the vast majority of your visitors will still accept your Let’s Encrypt certificate. If you provide an API or have to support IoT devices, you might have to pay a little more attention to the change.
you have to add their new "ISRG Root X1" certificate on client side or disable the ssl verification on your request.

Discribed here:
https://letsencrypt.org/docs/dst-root-c ... mber-2021/

Kevin

Re: ssl verification error

Posted: 12. Oct 2021, 10:30
by admin
here an working example:

Code: Select all

from urllib.parse import urlencode
from urllib.request import Request, urlopen
import base64
import requests

# remote image from url
image = base64.b64encode(urlopen("https://www.google.de/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png").read())

post_fields = {
	"t" : 'Test',
	"m" : 'Test Message',
	"s" : 11,
	"v" : 3,
	"i" : 33,
	"c" : '#FF0000',
	"d" : 'a',
	"u" : 'https://www.pushsafer.com',
	"ut" : 'Open Pushsafer',
	"k" : '[privatekey]',
	"p" : 'data:image/png;base64,'+str(image.decode('ascii')),
	}


session = requests.Session()
session.verify = False
session.trust_env = False
response = session.post(url='https://www.pushsafer.com/api', data=post_fields)

print(response.text)