markus-perl / pushover-cli

pushover-cli is a command line client for https://pushover.net to send pushover notifications. Moreover it is possible with this client to pipe streams directly to your cellphone like tail -f /var/log/my.log | pushover-cli -
50 stars 11 forks source link

SSL Verification error #11

Open ifuchs opened 3 years ago

ifuchs commented 3 years ago

I am trying to install pushover-cli on a Debian (buster) docker container. When I run pushover-cli, I am getting the following error: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

I realize that this is not a pushover-cli problem per se, but can anyone tell me how to go about resolving this? I tried a half dozen suggestions that a search of this error found but none seemed to help.

tuxthepenguin84 commented 1 year ago

https://docs.python.org/3/library/http.client.html "Changed in version 3.4.3: This class now performs all the necessary certificate and hostname checks by default. To revert to the previous, unverified, behavior ssl._create_unverified_context() can be passed to the context parameter."

Change this:

conn = http.HTTPSConnection(proxyhost, int(proxyport))

to this:

conn = http.HTTPSConnection(proxyhost, int(proxyport), context = ssl._create_unverified_context())

You may need to import the ssl library import ssl