only pass the subject's CN in cert authentication
use new SSLContext for python >= 3.2
- parse using ast.literal_eval instead of json
- add cred option for credentials
minor change in comment
change the way credentials options are parsed