Urllib2 - the ability to verify a certificate of pass

I need to somehow simulate the -k option (vide --insecure to ignore SSL certificate verification) for curl , but using urllib2 . Any clues?

+6
source share
1 answer

There is nothing special here. urllib2 does not check SSL certificate by default. The documentation has a warning http://docs.python.org/library/urllib2.html

Warning HTTPS requests do not validate server certificates.

+4
source

Source: https://habr.com/ru/post/921684/


All Articles