title: SSL error while connecting with python httplib and pem file
body: <p>I am trying to connect to an HTTPS WS with a python client using PEM file and httplib </p>
  
  <p>here is the code </p>
  
  <pre><code># HTTPS connection with python
  #!/usr/bin/env python
  
  import httplib , urllib 
  
  CERTFILE = 'path_to_pem_file'
  hostname = 'IP_address:Port_number'
  
  headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
  
  Json_data = {
      "amountTransaction": {
          some json data .. 
      }
  }
  
  params = urllib.urlencode(Json_data)
  
  conn = httplib.HTTPSConnection(
      hostname,
      key_file = CERTFILE,
      cert_file = CERTFILE 
  )
  
  
  conn.request("POST", '/url_to_call', params, headers)
  
  
  
  print conn.getreponse().read()
  
  print response.status, response.reason
  conn.close()
  </code></pre>
  
  <p>but I am receiving the following errror, </p>
  
  <pre><code>SSLError: [Errno 336265225] _ssl.c:354: error:140B0009:SSL        
  routines:SSL_CTX_use_PrivateKey_file:PEM lib
  </code></pre>
  
  <p>could you please check what's wrong </p>