Ulug'bek
Ulug'bek

Reputation: 2832

SSL certificate verify failed (_ssl.c:600)

Do you know about this error:

urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

This error occurred on my server when I run my app which is written on python, but when I run this app on local computer for sending requests to that server it works without any error. The python app sent to https request to myhost.com/action. and the web host is working with https. I checked ssl from sslchecker and it seems ssl installed succesfully. here is checker result:enter image description here

I don't know what I must show here to explain my problem. If you have a question about code or server settings I will try to answer as I can.

** This question isn't duplicate of that one

Upvotes: 4

Views: 10622

Answers (2)

Cedric Chen
Cedric Chen

Reputation: 31

A new ssl certification checking system is added in python 3, and one way to avoid the error of not passing certification is to nullify this mechanism:

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

Upvotes: 3

Melody
Melody

Reputation: 182

I don't know if this will work for you because i don't know your code. But i had the same problem. With this 4 lines my code work perfect:

import request

#disable ssl warning
requests.packages.urllib3.disable_warnings()
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_NONE

When you connect, set the parameter of sslContext to context.

Upvotes: 2

Related Questions