Messing about in python with SSL/TLS