title: SSL Client Authentication with Certificate in Chrome App
body: <p>I'm writing a Chrome app that needs to have an SSL socket with client authentication. I have done this before in Java with the same set of trust store and key store.</p>
  
  <p>Here is what I have done on Chrome (Mac and Chromebook):</p>
  
  <ul>
  <li><p>Add client key (p12) and CA (one root CA, one intermediate CA) to system.</p></li>
  <li><p>In Chrome app, try both the legacy <code>socket</code> API and the new <code>sockets.tcp</code> API.</p></li>
  <li><p>Always receiving error <code>ERR_SSL_CLIENT_AUTH_CERT_NEEDED</code>. But I think I already have the correct client cert and CA in the system. </p></li>
  </ul>
  
  <p>Code for legacy socket API:</p>
  
  <pre><code>chrome.socket.create('tcp',{},function(createInfo){
      mySocketId = createInfo.socketId;
      chrome.socket.connect(mySocketId,'host', 12345, function(connectResult){
          chrome.socket.secure(mySocketId,{},function(secureResult){
              console.log('secureResult '+secureResult);
          });
      });
  });
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Does the Chrome API support client auth with cert?</li>
  <li>If supported, how do I supply the certs to chrome?</li>
  </ol>