title: how to retrieve a ssl certificate in django?
body: <p>Is it possible to retrieve the client's SSL certificate from the current connection in Django?
  I don't see the certificate in the request context passed from the lighttpd.
  My setup has lighttpd and django working in fastcgi mode.
  Currently, I am forced to manually connect back to the client's IP to verify the certificate..
  Is there a clever technique to avoid this? Thanks!</p>
  
  <p>Update:
  I added these lines to my lighttpd.conf:</p>
  
  <pre><code>ssl.verifyclient.exportcert = "enable"
  setenv.add-request-header = (
      "SSL_CLIENT_CERT" =&gt; env.SSL_CLIENT_CERT
  )
  </code></pre>
  
  <p>Unfortunately, the env.SSL_CLIENT_CERT fails to dereference (does not exist?) and lighttpd fails to start.
  If I replace the "env.SSL_CLIENT_CERT" with a static value like "1", it is successfully passed to django in the request.META fields.
  Anything else, I could try? This is lighttpd 1.4.29.</p>