title: Set up two-way ssl authentication for web site
body: <p>I would like to implement <em>two-way ssl authentication</em> for a web site. I couldn't find a lot of documentation about this....</p>
  
  <p>What I want is something similar to what StartSSL has: </p>
  
  <ul>
  <li>Creating a client certificate and install it on the browser (registration)</li>
  <li>Check for the ssl client certificate when trying to access some pages (login)</li>
  </ul>
  
  <p>I found this tutorial: <a href="https://www.scriptjunkie.us/2013/11/adding-easy-ssl-client-authentication-to-any-webapp/" rel="nofollow">https://www.scriptjunkie.us/2013/11/adding-easy-ssl-client-authentication-to-any-webapp/</a> , and I followed it step by step.... </p>
  
  <p>This is the website where I'm experimenting: <a href="https://cert.devpgsv.com/getacert.php" rel="nofollow">https://cert.devpgsv.com/getacert.php</a></p>
  
  <p>(The code of "getacert.php" is here: <a href="https://cert.devpgsv.com/code.php" rel="nofollow">https://cert.devpgsv.com/code.php</a> )</p>
  
  <p>(I have enabled access to <a href="https://cert.devpgsv.com/.htaccess" rel="nofollow">.htaccess</a> file in case it is useful)</p>
  
  <p>The main problem I have right now is: when trying to generate the certificate, the browser displays: </p>
  
  <pre><code>El servidor a devuelto un certificado de cliente no valido. Error 207 (net:::ERR_CERT_INVALID) 
  </code></pre>
  
  <p>The error displays in Google Chrome, but not in Firefox......</p>
  
  <p>Info: I useApache2 installed on a Debian.</p>
  
  <p>Thanks for your help!</p>