by delinka · 14y ago · 0 comments
Or just serve your app/API/etc from different urls, plain HTTP for development and HTTPS for preprod and production.
Security is something that should just work - arguably, the first thing with such requirement. Even though it simply can't just work in many cases, it should be as close to just-working as it can.
http://docs.python.org/library/ssl.html#functions-constants-...
http://docs.python.org/library/ssl.html#ssl-certificates
However, this isn't exposed in the higher-level httplib.HTTPSConnection class for some reason. I'd bet it's not too hard to write your own subclass to handle it though.