title: Calling a REST api with an encrypted PEM client certificate
body: <p>I have got an encrypted client certificate and an encrypted key as PEM files and want to authenticate at a web site and to acquire a page (via GET) using a python script. I already managed to do so using curl in the shell. So I tried to call curl from the python script but I cannot use subprocess.Popen to send the password via stdin as the password is not read via stdin by curl (similar to ssh). I would be even happier if there  is a way to use the python standard libs to decode an encrypted certificate and use it to access the web site.</p>
  
  <p>I found several proposals for solving similar problems but non of them met all of my requirements:</p>
  
  <ul>
  <li>I do not want to save the unencrypted certificate anywhere.</li>
  <li>The user should only provide their passphrase once and subsequently several requests should be made. </li>
  <li>It must work with python 2.7.3, preferably even with python 2.6</li>
  </ul>